]> granicus.if.org Git - mutt/commitdiff
ups, the previous patch included a small buffer overflow.
authorThomas Roessler <roessler@does-not-exist.org>
Thu, 11 Nov 1999 18:30:25 +0000 (18:30 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Thu, 11 Nov 1999 18:30:25 +0000 (18:30 +0000)
rfc822.c

index 67a6a05d37ecd02e5deeb5b560acd0234ffe1cd5..f5721bb7e0b2af735e056c5f7dc882fe5d6f2a63 100644 (file)
--- 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++;