[Developers] [Patches] fix to integer overflow bug in PUGH
schnetter at cct.lsu.edu
Fri Apr 6 17:21:51 CDT 2007
On Apr 6, 2007, at 15:36:25, David Rideout wrote:
> The malloc calls in PUGH compute the size to allocate from an int
> expression. This patch casts such expressions to size_t. This
> fixes PR 2088.
> Patch also includes a check that malloc returns a non-NULL result...
The patch looks fine with one exception. You cannot print a value of
type size_t with %lu. I suggest to convert the value to double and
to print it with %f instead.
Erik Schnetter <schnetter at cct.lsu.edu>
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from www.keyserver.net.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20070407/f545a343/attachment.bin
More information about the Developers