From: Vincent Pit Date: Fri, 2 Jan 2009 11:24:44 +0000 (+0100) Subject: In amagic_call(), offset should be strictly lesser than the SV len to be allowed... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ed15e576876f5122f97f9cdd2b304e5a94efbc0a;p=p5sagit%2Fp5-mst-13.2.git In amagic_call(), offset should be strictly lesser than the SV len to be allowed to access the corresponding string buffer byte --- diff --git a/gv.c b/gv.c index 5b297e4..65419bd 100644 --- a/gv.c +++ b/gv.c @@ -1869,7 +1869,7 @@ Perl_amagic_call(pTHX_ SV *left, SV *right, int method, int flags) char *pv = SvPV(lex_mask, len); /* Bit set, so this overloading operator is disabled */ - if ( (STRLEN)offset <= len && pv[offset] & ( 1 << bit ) ) + if ( (STRLEN)offset < len && pv[offset] & ( 1 << bit ) ) return NULL; } }