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 18:57
Subject:
Re: [perl #129267] Possible string overrun with invalid len in gv.c
Message ID:
CANgJU+Ud2ZWYKhLcpiFVi3Vgd+rvCx-Qkx7F-8XOC=P1yoJaSA@mail.gmail.com
On 13 September 2016 at 20:29, Todd Rinaldo via RT
<perlbug-followup@perl.org> wrote:
> On Tue Sep 13 11:26:24 2016, demerphq wrote:
>
>> > I did not search for other examples. I thought it might be best to
>> > open a discussion before proceeding on any work.
>>
>> Not sure what there is to discuss really.  Wrong is wrong. ☺️
>>
>> Yves
>
>
> Proposed patch. I'm 99% certain we need <= not <. However this is why I use Perl. So I don't have to remember that ;)

FWIW. I dont think so. We need <.

Assume name = 0, and len = 10, then we should stop processing when
name hits 10, as the 10 chars we are allowed to look at will be at
memory positions 0 through 9.

If you use <= then we would try to dereference *10, which we dont own.

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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