[master] bd96f26bf fix off-by-one in vdp rot13

Nils Goroll nils.goroll at uplex.de
Thu Oct 8 09:34:06 UTC 2020


commit bd96f26bfb587c997c41eeb1a784b01eb2698a84
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Oct 7 13:47:49 2020 +0200

    fix off-by-one in vdp rot13
    
    It added a random byte.

diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index fc8232b91..13f602b16 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -144,7 +144,7 @@ xyzzy_rot13_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
 		}
 	}
 	if (i >= 0)
-		retval = VDP_bytes(vdx, act, q, i + 1L);
+		retval = VDP_bytes(vdx, act, q, i);
 	return (retval);
 }
 


More information about the varnish-commit mailing list