qemu-e2k/ui
Peter Maydell e12acaf75d ui/vnc-enc-hextile: Use static rather than dynamic length stack array
In the send_hextile_tile_* function we create a variable length array
data[].  In fact we know that the client_pf.bytes_per_pixel is at
most 4 (enforced by set_pixel_format()), so we can make the array a
compile-time fixed length of 1536 bytes.

The codebase has very few VLAs, and if we can get rid of them all we
can make the compiler error on new additions.  This is a defensive
measure against security bugs where an on-stack dynamic allocation
isn't correctly size-checked (e.g.  CVE-2021-3527).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
[ Marc-André - rename BPP to MAX_BYTES_PER_PIXEL ]
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230818151057.1541189-3-peter.maydell@linaro.org>
2023-09-04 14:57:44 +04:00
..
icons
shader ui/shader: fix #version directive must occur on first line 2023-03-13 23:48:45 +04:00
clipboard.c ui/clipboard: reset the serial state on reset 2022-09-23 14:38:27 +02:00
cocoa.m cocoa: Fix warnings about invalid prototype declarations 2023-06-13 11:28:58 +02:00
console-gl.c
console.c ui/vc: change the argument for QemuTextConsole 2023-09-04 14:57:44 +04:00
curses_keys.h For curses display, recognize a few more control keys 2023-07-25 10:56:51 +01:00
curses.c ui/curses: Avoid dynamic stack allocation 2022-09-22 16:38:28 +01:00
cursor_hidden.xpm
cursor_left_ptr.xpm
cursor.c ui/cursor: make width/height unsigned 16-bit integer 2023-05-28 13:08:25 +04:00
dbus-chardev.c ui/dbus: win32 support 2023-06-27 17:08:56 +02:00
dbus-clipboard.c ui/dbus: unregister clipboard on connection close 2023-03-13 22:57:39 +04:00
dbus-console.c ui: add optional d3d texture pointer to scanout texture 2023-06-27 17:08:56 +02:00
dbus-display1.xml ui/dbus: use shared D3D11 Texture2D when possible 2023-06-27 17:08:56 +02:00
dbus-error.c
dbus-listener.c ui/dbus: fix clang compilation issue 2023-08-01 23:52:23 +02:00
dbus-module.c
dbus.c ui/dbus: add GL support on win32 2023-06-27 17:08:56 +02:00
dbus.h ui/dbus: win32 support 2023-06-27 17:08:56 +02:00
egl-context.c ui/egl: fix make_context_current() callback return value 2023-06-27 17:08:56 +02:00
egl-headless.c ui: add optional d3d texture pointer to scanout texture 2023-06-27 17:08:56 +02:00
egl-helpers.c virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties 2023-07-17 15:22:28 +04:00
gtk-clipboard.c
gtk-egl.c ui/gtk: set scanout mode in gd_egl/gd_gl_area_scanout_texture 2023-08-07 17:13:42 +04:00
gtk-gl-area.c ui/gtk: set scanout mode in gd_egl/gd_gl_area_scanout_texture 2023-08-07 17:13:42 +04:00
gtk.c ui/vc: change the argument for QemuTextConsole 2023-09-04 14:57:44 +04:00
input-barrier.c
input-barrier.h
input-keymap.c
input-legacy.c
input-linux.c
input.c ui: add helpers for virtio-multitouch events 2023-05-28 13:08:25 +04:00
kbd-state.c
keymaps.c
keymaps.h
meson.build ui: add egl-headless support on win32 2023-06-27 17:08:56 +02:00
qemu-pixman.c ui: remove qemu_pixman_linebuf_copy() 2023-09-01 17:21:04 +00:00
qemu-x509.h
qemu.desktop
sdl2-2d.c
sdl2-gl.c ui: add optional d3d texture pointer to scanout texture 2023-06-27 17:08:56 +02:00
sdl2-input.c ui/vc: change the argument for QemuTextConsole 2023-09-04 14:57:44 +04:00
sdl2.c ui/vc: change the argument for QemuTextConsole 2023-09-04 14:57:44 +04:00
shader.c
spice-app.c ui/vc: do not parse VC-specific options in Spice and GTK 2023-09-04 14:57:37 +04:00
spice-core.c ui/spice: fix compilation on win32 2023-03-24 11:55:55 +01:00
spice-display.c ui/spice-display: Avoid dynamic stack allocation 2023-09-04 14:57:44 +04:00
spice-input.c
spice-module.c
trace-events ui/egl: query ANGLE d3d device 2023-06-27 17:08:56 +02:00
trace.h
udmabuf.c Do not include "qemu/error-report.h" in headers that do not need it 2023-02-14 09:11:27 +01:00
ui-hmp-cmds.c spice: move client_migrate_info command to ui/ 2023-04-24 15:01:46 +02:00
ui-qmp-cmds.c ui/qmp: move screendump to ui-qmp-cmds.c 2023-09-01 17:21:04 +00:00
util.c include/hw/pci: Split pci_device.h off pci.h 2023-01-08 01:54:22 -05:00
vdagent.c Do not include "qemu/error-report.h" in headers that do not need it 2023-02-14 09:11:27 +01:00
vgafont.h ui: fix tab indentation 2022-11-08 10:23:06 +01:00
vnc_keysym.h ui: fix tab indentation 2022-11-08 10:23:06 +01:00
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-clipboard.c ui/vnc-clipboard: fix infinite loop in inflate_buffer (CVE-2023-3255) 2023-07-17 15:20:56 +04:00
vnc-enc-hextile-template.h ui/vnc-enc-hextile: Use static rather than dynamic length stack array 2023-09-04 14:57:44 +04:00
vnc-enc-hextile.c Drop useless casts from g_malloc() & friends to pointer 2022-10-22 23:15:40 +02:00
vnc-enc-tight.c misc: Fix some typos in documentation and comments 2023-08-01 23:52:23 +02:00
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle.c
vnc-enc-zrle.c.inc
vnc-enc-zrle.h
vnc-enc-zywrle-template.c ui: fix tab indentation 2022-11-08 10:23:06 +01:00
vnc-enc-zywrle.h ui: fix tab indentation 2022-11-08 10:23:06 +01:00
vnc-jobs.c vnc: move assert in vnc_worker_thread_loop 2023-06-10 00:00:24 +03:00
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-stubs.c
vnc-ws.c bulk: Remove pointless QOM casts 2023-06-05 20:48:34 +02:00
vnc-ws.h
vnc.c cutils: Adjust signature of parse_uint[_full] 2023-06-02 12:27:19 -05:00
vnc.h ui: keep current cursor with QemuConsole 2023-03-13 22:57:39 +04:00
win32-kbd-hook.c
x_keymap.c
x_keymap.h