[Spice-devel] [PATCH] prevent integer overflow on 32 bit
Christophe Fergeau
cfergeau at redhat.com
Wed Aug 26 07:09:04 PDT 2015
On Fri, Aug 21, 2015 at 10:23:57AM +0100, Frediano Ziglio wrote:
> On 32 bit machine timespec->tv_sec (time_t) is 32 bit.
"On 32 bit machines, timespec->..."
> Also 1000 * 1000 * 1000 is 32 bit.
> The multiplication 32 x 32 lead to a 32 bit however this can overflow.
"The multiplication of 2 32 bit integers gives a 32 bit integer, however
this can overflow"
> Convert the first factor to 64 bit before multiply solve the issue.
"Converting the first factor to 64 bit before the multiplication solves
the issue" ?
ACK.
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150826/93eb8ede/attachment.sig>
More information about the Spice-devel
mailing list