Malloc routines have overflow problems
J. Johnston
jjohnstn@redhat.com
Fri Aug 9 18:22:00 GMT 2002
Jason Tishler wrote:
>
> Jeff,
>
> On Fri, Aug 09, 2002 at 05:35:52PM -0400, J. Johnston wrote:
> > Jason Tishler wrote:
> > > Is the attached, hopefully less intrusive, patch more acceptable?
> > > Or, is it just more ugly? :,)
> >
> > The attached patch is fine. Patch checked in.
>
> Sorry for not supplying a ChangeLog, but I didn't think that I was going
> to ring the bell this time. :,)
>
> BTW, mEMALIGn() *might* have similar issues because it uses request2size
> and has some (long) casts too. Maybe the same overflow check should be
> used here too?
>
No, this is not a problem. mEMALIGn turns around and calls mALLOc which has
the check. If mALLOc fails, it fails immediately.
-- Jeff J.
More information about the Newlib
mailing list