]> xenbits.xensource.com Git - qemu-xen-3.3-testing.git/commit
hw/serial.c: Avoid integer multiply overflow in token generation calculation
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 1 Oct 2008 12:54:16 +0000 (13:54 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 12 Feb 2009 11:02:36 +0000 (11:02 +0000)
commitd235682c3e897db55899e1c89d988a17d0f5e463
tree1862c26b891b5ef0d4a1d6113275b2704e664106
parent52dabf373ee853185b77d536d7e7a4b71be1ade7
hw/serial.c: Avoid integer multiply overflow in token generation calculation

If calls to serial_get_token are too far apart then delta.tv_sec may
be too large to multiply by 1E9.  So we clamp delta to 2s.
(cherry picked from commit d2807803a5ba22003155ed50802f7c4e92c8ddd7)
hw/serial.c