This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Malloc routines have overflow problems


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]