]> git.ipfire.org Git - thirdparty/qemu.git/commit
cutils: Fix size_to_str() on 32-bit platforms
authorEric Blake <eblake@redhat.com>
Wed, 17 Apr 2019 17:11:00 +0000 (12:11 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 17 Sep 2019 19:23:34 +0000 (14:23 -0500)
commit48025d942e2f4fc3582c37f17a30d0af7d474a66
tree8815973bba1d06db3859c587772d9ec225fcc359
parent626a95f4aa3823e4a1d121ce30400ed843153c10
cutils: Fix size_to_str() on 32-bit platforms

When extracting a human-readable size formatter, we changed 'uint64_t
div' pre-patch to 'unsigned long div' post-patch. Which breaks on
32-bit platforms, resulting in 'inf' instead of intended values larger
than 999GB.

Fixes: 22951aaa
CC: qemu-stable@nongnu.org
Reported-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 754da86714d550c3f995f11a2587395081362e0a)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
util/cutils.c