1 ------------------------------------------------------------
4 timestamp: Mon 2006-06-19 18:14:03 +0000
6 From: TAKAHASHI Tamotsu <tamo@momonga-linux.org>
8 Fix browse_get_namespace() which could overflow ns[LONG_STRING].
9 (Possible remote vulnerability)
10 ------------------------------------------------------------
13 timestamp: Mon 2006-06-19 18:14:54 +0000
19 +2006-06-19 18:14:03 TAKAHASHI Tamotsu <tamo@momonga-linux.org> (brendan)
21 + * imap/browse.c: Fix browse_get_namespace() which could overflow
22 + ns[LONG_STRING]. (Possible remote vulnerability)
24 2006-04-03 20:26:14 Brendan Cully <brendan@kublai.com> (brendan)
26 * imap/command.c: Don't pass a null destination to imap_fix_path
27 --- imap/browse.c.orig
33 - while (*s && *s != '\"')
34 + while (*s && *s != '\"' && n < sizeof (ns) - 1)
42 - while (*s && !ISSPACE (*s))
43 + while (*s && !ISSPACE (*s) && n < sizeof (ns) - 1)
49 + if (n == sizeof (ns) - 1)
50 + dprint (1, (debugfile, "browse_get_namespace: too long: [%s]\n", ns));
52 s = imap_next_word (s);
53 /* delimiter is meaningless if namespace is "". Why does