summaryrefslogtreecommitdiffstats
path: root/rfc822.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1999-11-11 18:30:25 +0000
committerThomas Roessler <roessler@does-not-exist.org>1999-11-11 18:30:25 +0000
commitd413403a17f0117ad48c8780ae7ca86d46280a74 (patch)
tree23615f344a3d5748a32959dca279f259100c68a1 /rfc822.c
parentf5c63ae6127de68e0541815955ba5bc73b24cb36 (diff)
ups, the previous patch included a small buffer overflow.
Diffstat (limited to 'rfc822.c')
-rw-r--r--rfc822.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rfc822.c b/rfc822.c
index 67a6a05d..f5721bb7 100644
--- a/rfc822.c
+++ b/rfc822.c
@@ -138,7 +138,8 @@ parse_quote (const char *s, char *token, size_t *tokenlen, size_t tokenmax)
if (!*++s)
break;
- token[*tokenlen] = *s;
+ if (*tokenlen < tokenmax)
+ token[*tokenlen] = *s;
}
(*tokenlen)++;
s++;