qemu-e2k/include/sysemu
Markus Armbruster d09acb9b5e fw_cfg: Splash image loader can overrun a stack variable, fix
read_splashfile() passes the address of an int variable as size_t *
parameter to g_file_get_contents(), with a cast to gag the compiler.

No problem on machines where sizeof(size_t) == sizeof(int).

Happens to work on my x86_64 box (64 bit little endian): the least
significant 32 bits of the file size end up in the right place
(caller's variable file_size), and the most significant 32 bits
clobber a place that gets assigned to before its next use (caller's
variable file_type).

I'd expect it to break on a 64 bit big-endian box.

Fix up the variable types and drop the problematic cast.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-01-26 13:23:33 +00:00
..
arch_init.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
balloon.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
blockdev.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
cpus.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
device_tree.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dma.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
dump.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
kvm.h kvm: Add fake KVM constants to avoid #ifdefs on KVM-specific code 2013-01-15 04:09:14 +01:00
memory_mapping.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
os-posix.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
os-win32.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
qtest.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
seccomp.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00
sysemu.h fw_cfg: Splash image loader can overrun a stack variable, fix 2013-01-26 13:23:33 +00:00
xen-mapcache.h softmmu: move include files to include/sysemu/ 2012-12-19 08:32:45 +01:00