1 From: brendan <brendan>
2 Date: Mon, 19 Jun 2006 18:14:03 +0000 (+0000)
3 Subject: From: TAKAHASHI Tamotsu <tamo@momonga-linux.org>
4 X-Git-Url: http://dev.mutt.org/cgi-bin/gitweb.cgi?p=mutt/.git;a=commitdiff;h=dc0272b749f0e2b102973b7ac43dbd3908507540
6 From: TAKAHASHI Tamotsu <tamo@momonga-linux.org>
8 Fix browse_get_namespace() which could overflow ns[LONG_STRING].
9 (Possible remote vulnerability)
14 @@ -505,7 +505,7 @@ static int browse_get_namespace (IMAP_DA
18 - while (*s && *s != '\"')
19 + while (*s && *s != '\"' && n < sizeof (ns) - 1)
23 @@ -516,12 +516,14 @@ static int browse_get_namespace (IMAP_DA
27 - while (*s && !ISSPACE (*s))
28 + while (*s && !ISSPACE (*s) && n < sizeof (ns) - 1)
34 + if (n == sizeof (ns) - 1)
35 + dprint (1, (debugfile, "browse_get_namespace: too long: [%s]\n", ns));
37 s = imap_next_word (s);
38 /* delimiter is meaningless if namespace is "". Why does