]> granicus.if.org Git - neomutt/commitdiff
Fix off-by-one errors in mailcap parser. Closes #3362
authorBrendan Cully <brendan@kublai.com>
Mon, 14 Dec 2009 18:24:59 +0000 (10:24 -0800)
committerBrendan Cully <brendan@kublai.com>
Mon, 14 Dec 2009 18:24:59 +0000 (10:24 -0800)
ChangeLog
rfc1524.c

index 69e82789cacc519959c0677fe8261c72b6854da3..6c94cda5239e547773ac853f89fee856b13a718f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-12-10 22:52 -0800  Daniel Jacobowitz  <dan@debian.org>  (b7d2cb7c7ce1)
+
+       * hcache.c: Do not store header color in hcache. If the color
+       directive is removed from muttrc, the cached value from the last
+       directive would otherwise still be in effect.
+
+2009-12-07 23:08 -0800  Patrick Welche  <prlw1@cam.ac.uk>  (1cf34ea1f128)
+
+       * mutt_ssl.c: STACK* is not defined with newer SSL, use
+       STACK_OF instead. Closes #3356.
+
 2009-12-07 22:46 -0800  Peter Rosin  <peda@lysator.liu.se>  (fc9563de3dcb)
 
        * snprintf.c: Output %p as unsigned in the bundled snprintf
index bc709aef63b18bd69972c1ef07b595dfe5d1ff57..a4706545c5912de627a7e6ef4cbb17d9dff236cc 100644 (file)
--- a/rfc1524.c
+++ b/rfc1524.c
@@ -68,9 +68,10 @@ int rfc1524_expand_command (BODY *a, char *filename, char *_type,
   if (option (OPTMAILCAPSANITIZE))
     mutt_sanitize_filename (type, 0);
 
-  while (command[x] && x<clen && y<sizeof(buf)) 
+  while (x < clen && command[x] && y < sizeof (buf) - 1)
   {
-    if (command[x] == '\\') {
+    if (command[x] == '\\')
+    {
       x++;
       buf[y++] = command[x++];
     }
@@ -85,7 +86,7 @@ int rfc1524_expand_command (BODY *a, char *filename, char *_type,
        int z = 0;
 
        x++;
-       while (command[x] && command[x] != '}' && z<sizeof(param))
+       while (command[x] && command[x] != '}' && z < sizeof (param) - 1)
          param[z++] = command[x++];
        param[z] = '\0';