]> 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, 9 Jul 2019 17:22:01 +0000 (12:22 -0500)
commit3c9e488dbeb223991f3124aafd801ab647bbde8d
tree748b8b4dbb37d8f559c03c77964c4d51e2fae842
parentc627cc38be31b352ff83f7837c5419d34b1b295b
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