develooper Front page | perl.perl5.porters | Postings from September 2016

Re: [perl #129267] Possible string overrun with invalid len in gv.c

Thread Previous | Thread Next
From:
demerphq
Date:
September 13, 2016 19:03
Subject:
Re: [perl #129267] Possible string overrun with invalid len in gv.c
Message ID:
CANgJU+V9VXGNEtT-X6v9U2KnMG9vgr16CzEUPqdikS-45wEeXQ@mail.gmail.com
On 13 September 2016 at 20:55, Todd Rinaldo via RT
<perlbug-followup@perl.org> wrote:
> On Tue Sep 13 11:51:18 2016, demerphq wrote:
>
>> Well, that fixes /one/ issue. But I think there are more. I was
>> putting together a patch like this:
>>
>> $ git diff gv.c
>> diff --git a/gv.c b/gv.c
>> index 1bc8bf2..23700a0 100644
>> --- a/gv.c
>> +++ b/gv.c
>> @@ -1009,6 +1009,7 @@ GV *
>>  Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name,
>> const STRLEN len, U32 flags)
>>  {
>>      const char *nend;
>> +    const char * const name_end= name + len;
> s/char * const/char */

Is that required for some reason I haven't noticed? My version feels
right as we aren't allowed to write to *name_end as it points to
memory we dont know we own.

Yves

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About