# Small patch backported from 2.2.9 to stop us running off the end of the # array in the case of BODY[P. --- cyrus-imapd-2.1.16/imap/imapd.c 2003-09-24 15:16:02.000000000 +0100 +++ cyrus-imapd/imap/imapd.c 2004-11-23 10:30:08.988440740 +0000 @@ -2687,7 +2687,7 @@ else if (!strncmp(fetchatt.s, "BODY[", 5) || !strncmp(fetchatt.s, "BODY.PEEK[", 10)) { p = section = fetchatt.s + 5; - if (*p == 'P') { + if (!strncmp(p, "PEEK[", 5)) { p = section += 5; } else { @@ -3051,7 +3051,7 @@ else if (!strncmp(data, "body[", 5) || !strncmp(data, "body.peek[", 10)) { p = section = data + 5; - if (*p == 'p') { + if (!strncmp(p, "peek[", 5)) { p = section += 5; } else {