aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-09-01 15:36:55 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-09-01 15:38:21 +0200
commite725365d457e7264705d168291ee311b439a086c (patch)
tree278ce18a9fe2b2d30c878b359921c5fa5f76c4b0
parent4d63b6fd8e1233b437a334fd97d29216e0ce0fd2 (diff)
downloadmblaze-e725365d457e7264705d168291ee311b439a086c.tar.gz
blaze822: blaze822_addr: add bounds check when extracting display name
Discovered using the TREC 2005 Spam Public Corpora. http://plg.uwaterloo.ca/~gvcormac/treccorpus/README.html
-rw-r--r--blaze822.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/blaze822.c b/blaze822.c
index a96cd11..ebeb648 100644
--- a/blaze822.c
+++ b/blaze822.c
@@ -150,7 +150,7 @@ blaze822_addr(char *s, char **dispo, char **addro)
*disp = 0;
*addr = 0;
- while (*s) {
+ while (*s && c < e) {
startover:
if (*s == '<') {
char *c = addr;