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

Re: Shouldn't we be fixing our function interfaces to removeinappropriate I32 U32?

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
August 12, 2017 15:19
Subject:
Re: Shouldn't we be fixing our function interfaces to removeinappropriate I32 U32?
Message ID:
CAHhgV8iYzAPvGR2puom8Zkz1FfwXj3KFqca4QVtYf+s_1J5CnQ@mail.gmail.com
On Fri, Aug 11, 2017 at 3:02 AM, Father Chrysostomos <sprout@cpan.org>
wrote:

> Karl Williamson wrote:
> > I'm thinking we should go through embed.fnc looking for these parameter
> > types that are specifying lengths, and change them, even if these are in
> > the public API.  Aren't these are segfaults and DOS attacks waiting to
> > happen?
> >
> > Zefram said we did something similar a while back with array indices.
> >
> > I'm unsure of the implications for modules that can work on earlier
> perls.
>
> The main problem to watch out for is I32 pointers.  I32* parameters cannot
> be changed without really breaking things.
>
> Also, be aware that not every use of I32 is bad.
>

Fortunately, we have very few of those in the API. hv_iterkey is the only
one that looks problematic to me.

Leon

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