develooper Front page | perl.perl5.porters | Postings from January 2017

[perl #130635] [PATCH] Stack overflow in Storable retrieve_hook

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
January 30, 2017 22:17
Subject:
[perl #130635] [PATCH] Stack overflow in Storable retrieve_hook
Message ID:
rt-4.0.24-30173-1485814664-1158.130635-15-0@perl.org
On Mon, 30 Jan 2017 09:33:44 -0800, john@nixnuts.net wrote:
> On Sun, 2017-01-29 at 21:12 -0800, Tony Cook via RT wrote:
> > On Sat, 28 Jan 2017 16:41:50 -0800, john@nixnuts.net wrote:
> > > An updated patch is attached.
> >
> > Won't the allocated buffer leak if the load_module() fails, no
> > STORABLE_thaw
> > is defined, or if STORABLE_thaw dies?
> >
> 
> Yes, Storable has several codepaths where it leaks memory or crashes
> while
> allocating  memory. I'd be happy to try and fix these problems more
> systematically, but IMHO they are separate issues from the stack
> overflow.

There's no need to add more leaks though.

You can use SAVEFREEPV() to free the allocated memory on scope exit.

Tony



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=130635

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