[PATCH] Resolve buffer overflow in libm-test-inc check_complex()

Marcus Shawcroft marcus.shawcroft@linaro.org
Thu Nov 15 12:06:00 GMT 2012


On 14 November 2012 23:11, Joseph S. Myers <joseph@codesourcery.com> wrote:

> When using asprintf, please check the return value and produce an
> appropriate error if it is -1 (maybe just abort the test, in this case).
> (If the return value is -1, the value of the pointer asprintf sets is
> undefined, so you do need to check the return value before using that
> pointer.)


Revised version attached.

Cheers
/Marcus

2012-11-15  Marcus Shawcroft  <marcus.shawcroft@linaro.org>

	* math/libm-test.inc (check_complex): Use asprintf.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buffer-overflow.diff
Type: application/octet-stream
Size: 1251 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20121115/cd09bebb/attachment.obj>


More information about the Libc-alpha mailing list