[5.2] 8d3e711 VMOD blob: use sentinel values that are strictly signed char in the decode table for base64.

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Thu Sep 7 06:59:06 UTC 2017


commit 8d3e711eafad86d5742e1c9772d24b92adb548a8
Author: Geoff Simmons <geoff at uplex.de>
Date:   Mon Sep 4 20:39:12 2017 +0200

    VMOD blob: use sentinel values that are strictly signed char in the
    decode table for base64.

diff --git a/lib/libvmod_blob/base64.h b/lib/libvmod_blob/base64.h
index 708b588..bd83798 100644
--- a/lib/libvmod_blob/base64.h
+++ b/lib/libvmod_blob/base64.h
@@ -28,8 +28,8 @@
 
 #include "vmod_blob.h"
 
-#define ILL ((int8_t) -1)
-#define PAD ((int8_t) -2)
+#define ILL ((int8_t) 127)
+#define PAD ((int8_t) 126)
 
 static const struct b64_alphabet {
 	const char b64[64];


More information about the varnish-commit mailing list