This is the mail archive of the newlib@sourceware.org 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]

printf bug


Hi,

The *may* be a bug in printf.

printf() does not return an error when printing a floating point value
when there is no heap left.

The library source file, dtoa.c, does not check for a NULL return value
of the malloc call as shown here:

  _REENT_MP_RESULT(ptr) = Balloc (ptr, _REENT_MP_RESULT_K(ptr));
  s = s0 = (char *) _REENT_MP_RESULT(ptr);

  ... s and s0 are not checked before used.

Dave


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