From 823754d3c5ac24e7322d325f909506889d57cb91 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Thu, 11 Nov 1999 18:30:25 +0000 Subject: [PATCH] ups, the previous patch included a small buffer overflow. --- rfc822.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rfc822.c b/rfc822.c index 67a6a05d3..f5721bb7e 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++; -- 2.40.0