[master] 216f878 Minor polish
Poul-Henning Kamp
phk at FreeBSD.org
Tue Oct 14 08:37:57 CEST 2014
commit 216f878414563a5e479d5d8f15ffd5b86acfd600
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Oct 14 06:37:35 2014 +0000
Minor polish
diff --git a/bin/varnishd/cache/cache_vrt_re.c b/bin/varnishd/cache/cache_vrt_re.c
index d784c13..15b11a5 100644
--- a/bin/varnishd/cache/cache_vrt_re.c
+++ b/bin/varnishd/cache/cache_vrt_re.c
@@ -157,7 +157,7 @@ VRT_regsub(VRT_CTX, int all, const char *str, void *re,
offset = ovector[1];
if (!all)
break;
- memset(&ovector, 0, sizeof(ovector));
+ memset(ovector, 0, sizeof(ovector));
options |= VRE_NOTEMPTY;
i = VRE_exec(t, str, len, offset, options, ovector, 30,
&cache_param->vre_limits);
@@ -170,7 +170,7 @@ VRT_regsub(VRT_CTX, int all, const char *str, void *re,
} while (i != VRE_ERROR_NOMATCH);
/* Copy suffix to match */
- Tadd(&res_b, res_e, str + offset, len - offset + 1);
+ Tadd(&res_b, res_e, str + offset, 1 + len - offset);
if (res_b >= res_e) {
WS_Release(ctx->ws, 0);
return (str);
More information about the varnish-commit
mailing list