[master] 8bbbdfa Try to work around systems having unsigned char types.
Poul-Henning Kamp
phk at FreeBSD.org
Thu Jun 29 10:38:05 CEST 2017
commit 8bbbdfa3f4661aa5149a5ebc4e80167b4465312e
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Thu Jun 29 08:37:09 2017 +0000
Try to work around systems having unsigned char types.
diff --git a/lib/libvarnishapi/vjsn.c b/lib/libvarnishapi/vjsn.c
index 01f10c2..6ae82fa 100644
--- a/lib/libvarnishapi/vjsn.c
+++ b/lib/libvarnishapi/vjsn.c
@@ -214,7 +214,7 @@ vjsn_string(struct vjsn *js)
js->err = "Unterminate string";
return (NULL);
}
- if (*js->ptr >= 0x00 && *js->ptr <= 0x1f) {
+ if ((unsigned char)(*js->ptr) <= 0x1f) {
js->err = "unescaped control char in string";
return (NULL);
}
More information about the varnish-commit
mailing list