projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
67c8e34
)
pcrs_compile_replacement(): Silence a coverity warning (CID #161203)
author
Fabian Keil
<fk@fabiankeil.de>
Sun, 8 May 2016 10:45:51 +0000
(10:45 +0000)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 8 May 2016 10:45:51 +0000
(10:45 +0000)
pcrs.c
patch
|
blob
|
history
diff --git
a/pcrs.c
b/pcrs.c
index
156ae98
..
93f5827
100644
(file)
--- a/
pcrs.c
+++ b/
pcrs.c
@@
-1,4
+1,4
@@
-const char pcrs_rcs[] = "$Id: pcrs.c,v 1.4
7 2015/01/24 16:40:59
fabiankeil Exp $";
+const char pcrs_rcs[] = "$Id: pcrs.c,v 1.4
8 2015/12/27 12:45:46
fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/pcrs.c,v $
@@
-376,7
+376,9
@@
static pcrs_substitute *pcrs_compile_replacement(const char *replacement, int tr
}
/* Valid and in range? -> record */
}
/* Valid and in range? -> record */
- if (0 <= r->backref[l] && r->backref[l] < PCRS_MAX_SUBMATCHES + 2)
+ if ((0 <= r->backref[l]) &&
+ (r->backref[l] < PCRS_MAX_SUBMATCHES + 2) &&
+ (l < PCRS_MAX_SUBMATCHES - 1))
{
r->backref_count[r->backref[l]] += 1;
r->block_offset[++l] = k;
{
r->backref_count[r->backref[l]] += 1;
r->block_offset[++l] = k;