From: Jarkko Hietaniemi Date: Sat, 23 Mar 2002 01:40:53 +0000 (+0000) Subject: Purify: Array bounds read: could read one character past the end. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=92aa5668606f4f055c218a4b78284d36348495a3;p=p5sagit%2Fp5-mst-13.2.git Purify: Array bounds read: could read one character past the end. p4raw-id: //depot/perl@15438 --- diff --git a/pp_pack.c b/pp_pack.c index b653362..7df5f45 100644 --- a/pp_pack.c +++ b/pp_pack.c @@ -1525,8 +1525,9 @@ Perl_unpack_str(pTHX_ char *pat, register char *patend, register char *s, char * } if (*s == '\n') s++; - else if (s[1] == '\n') /* possible checksum byte */ - s += 2; + else /* possible checksum byte */ + if (s + 1 < strend && s[1] == '\n') + s += 2; } XPUSHs(sv_2mortal(sv)); break;