mirror of https://gitee.com/openkylin/qemu.git
Miscellaneous patches for 2019-11-25
-----BEGIN PGP SIGNATURE----- iQJGBAABCAAwFiEENUvIs9frKmtoZ05fOHC0AOuRhlMFAl3bbfgSHGFybWJydUBy ZWRoYXQuY29tAAoJEDhwtADrkYZT/BkP/iUxbtDGryANOmXKIa9m0LEFQ8HUi4Xe w5UOK5FWvvXzo2n4pJuFMIoDy7yed65AYp7Hc4/f2m1OE68MIvlBqEvU5FExpaoJ /LG51i/fsgAKlqlMLyeO2l+TLsyiOivP4Vwz+Ui5/CQKGox+evjWoYBMWGt2GhmL IdjtoXopfNLVMa5ZC525Sd5DSikM8E+ZhDai202G2fJQA4FuLNGDjrv54SjRzlYq YGYnWdW+XwUjBV1tg3JEiBUJHwhognVb7/Ca/+XNc+eehU4Fsk5qABVXUHg3YuIZ o0wHaqMYCBm+K7Vy3qS/0HuXLvkKuvmsMD57sjtZJvRW84z8QE5vcFsrt5HbhGxf s0L+9GjrWjYpnntPG/uVfeJsmIrKgDCkp6VtD76p61RmmBBsfyaR+81HqhgzutXZ zp1eV9AbHrQzagCwh/EPdJ49vuA0oZGCD16I1CfCsb4MbA4Y9gRVWK6e8ektV9gj gBdoP91HdYK7Stg5vpwP2AbyjviYQzUYHk3gJ8aF5msFtOw0jcynFV3542TzizDU RVRrSiS2BcQyDR2ACLhSz2BkwubLR61xkMBp13XFVCjV8/ZQnR7WmgA7Lc643U2L o7sqrK5y3g661uo/vRA9D17SRiLvcAn+pVAC6RkGjtmyapOp/ezRJWLuj0Yd4a/k 5GMOL5jZlLLH =A5b2 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2019-11-25' into staging Miscellaneous patches for 2019-11-25 # gpg: Signature made Mon 25 Nov 2019 06:00:24 GMT # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-misc-2019-11-25: util/cutils: Fix incorrect integer->float conversion caught by clang Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
6d05e39d69
|
@ -239,10 +239,12 @@ static int do_strtosz(const char *nptr, const char **end,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* Values >= 0xfffffffffffffc00 overflow uint64_t after their trip
|
* Values near UINT64_MAX overflow to 2**64 when converting to double
|
||||||
* through double (53 bits of precision).
|
* precision. Compare against the maximum representable double precision
|
||||||
|
* value below 2**64, computed as "the next value after 2**64 (0x1p64) in
|
||||||
|
* the direction of 0".
|
||||||
*/
|
*/
|
||||||
if ((val * mul >= 0xfffffffffffffc00) || val < 0) {
|
if ((val * mul > nextafter(0x1p64, 0)) || val < 0) {
|
||||||
retval = -ERANGE;
|
retval = -ERANGE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue