]> git.proxmox.com Git - qemu.git/commit
sdl: Fix heap smash in sdl_zoom_rgb{16,32} for int > 32 bits
authorMarkus Armbruster <armbru@redhat.com>
Tue, 15 Jan 2013 14:42:32 +0000 (15:42 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Wed, 16 Jan 2013 00:25:30 +0000 (18:25 -0600)
commitcc69bda6c97a1c193348eb381f4bffdfd1c8a948
treeeee579c0c5657388a73451e6c09766330ce44f3f
parentdabe3143e0f36a78a65c0dce1e298e31df1be6c4
sdl: Fix heap smash in sdl_zoom_rgb{16,32} for int > 32 bits

Careless use of malloc(): allocate Uint32[N], assign to int *, use
int[N].

Fix by converting to g_new().

Functions can't fail anymore, so make them return void.  Caller
ignored the value anyway.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ui/sdl_zoom.c
ui/sdl_zoom_template.h