summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGavan <gavan@coolfactor.org>2020-08-21 15:46:01 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-08-21 15:46:01 +0100
commite0ae68c8ee6788508da4989ee0d6fcbaf40c7b97 (patch)
tree24e57888ba1ec6a5db743316811c19e1877dfd51 /src
parent7044dd8fd62e215572ecf5a2c7f1bb9581cf6628 (diff)
Taint: fix off-by-one in is_tainted(). Bug 2634
Diffstat (limited to 'src')
-rw-r--r--src/src/store.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/src/store.c b/src/src/store.c
index 47d6f9106..df7078fea 100644
--- a/src/src/store.c
+++ b/src/src/store.c
@@ -188,14 +188,14 @@ for (int pool = POOL_TAINT_BASE; pool < nelem(chainbase); pool++)
if ((b = current_block[pool]))
{
uschar * bc = US b + ALIGNED_SIZEOF_STOREBLOCK;
- if (US p >= bc && US p <= bc + b->length) return TRUE;
+ if (US p >= bc && US p < bc + b->length) return TRUE;
}
for (int pool = POOL_TAINT_BASE; pool < nelem(chainbase); pool++)
for (b = chainbase[pool]; b; b = b->next)
{
uschar * bc = US b + ALIGNED_SIZEOF_STOREBLOCK;
- if (US p >= bc && US p <= bc + b->length) return TRUE;
+ if (US p >= bc && US p < bc + b->length) return TRUE;
}
return FALSE;
}