X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=pcrs.c;h=955ccf8baffcaaadcb04ed2b7785adb95786ff66;hp=93f582784611efb612ab3bec1f90aba15c1d0a87;hb=239c9fc5994c5c76927733bf383bbdb8072e8d2a;hpb=797ddff0b98384c2033537b283c9e6e43fba8df3 diff --git a/pcrs.c b/pcrs.c index 93f58278..955ccf8b 100644 --- a/pcrs.c +++ b/pcrs.c @@ -1,4 +1,4 @@ -const char pcrs_rcs[] = "$Id: pcrs.c,v 1.48 2015/12/27 12:45:46 fabiankeil Exp $"; +const char pcrs_rcs[] = "$Id: pcrs.c,v 1.49 2016/05/08 10:45:51 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $ @@ -375,6 +375,8 @@ static pcrs_substitute *pcrs_compile_replacement(const char *replacement, int tr goto plainchar; } + assert(l < PCRS_MAX_SUBMATCHES - 1); + assert(r->backref[l] < PCRS_MAX_SUBMATCHES + 2); /* Valid and in range? -> record */ if ((0 <= r->backref[l]) && (r->backref[l] < PCRS_MAX_SUBMATCHES + 2) &&