aboutsummaryrefslogtreecommitdiff
path: root/qstring.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-11-16 19:41:56 +0100
committerBlue Swirl <blauwirbel@gmail.com>2011-11-19 11:23:42 +0000
commit725e14e91f80b6b2c07b75b66b7b042a9fa9340c (patch)
tree093a3bfc53e586113b29cd69702cf8b9150f9c4b /qstring.h
parent96d922a654f4b5a806af43d6dc6fa7c1becbbac6 (diff)
downloadqemu-725e14e91f80b6b2c07b75b66b7b042a9fa9340c.zip
qemu-725e14e91f80b6b2c07b75b66b7b042a9fa9340c.tar.gz
qemu-725e14e91f80b6b2c07b75b66b7b042a9fa9340c.tar.bz2
loader: Fix read_targphys() to behave when read() fails
Happily passes (size_t)-1 to rom_add_blob_fixed(), which promptly dies attempting to malloc that much. Spotted by Coverity. Bonus fix for ROMs larger than INT_MAX bytes: return ssize_t instead of int. Bug can't bite, because the only user load_aout() limits ROM size to an int value. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'qstring.h')
0 files changed, 0 insertions, 0 deletions