weston/clients
Frank Binns 77f7daca68 smoke: fix valgrind invalid read errors
There are a number of invalid read errors reported by valgrind of the
form:
	==13428== Invalid read of size 4
        ==13428==    at 0x405656: advect (smoke.c:116)
        ==13428==    by 0x405E80: redraw_handler (smoke.c:228)
        ==13428==    by 0x40DE74: widget_redraw (window.c:3995)
        ==13428==    by 0x40E02D: surface_redraw (window.c:4053)
        ==13428==    by 0x40E0C9: idle_redraw (window.c:4082)
        ==13428==    by 0x410FC9: display_run (window.c:5561)
        ==13428==    by 0x406518: main (smoke.c:373)
        ==13428==  Address 0xb2c9b14 is 4 bytes after a block of size
                   160,000 alloc'd
        ==13428==    at 0x4C29DB4: calloc
        ==13428==    by 0x40646B: main (smoke.c:360)

This results in invalid rendering when running a debug version of the
application.

Fix the issue by limiting the maximum values of px and py to 1.5 less
than width and height. This prevents reading past the end of the source
buffer.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82287
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-11-11 12:59:43 +02:00
..
calibrator.c Make sure config.h is included before any system headers 2014-04-07 10:22:28 -07:00
clickdot.c input: Schedule pointer sprite repaint when cursor is set 2014-09-10 14:20:13 +03:00
cliptest.c cliptest: sync calculate_edges with master copy 2014-08-20 11:51:27 +03:00
desktop-shell.c desktop-shell: properly set background widget as opaque 2014-08-28 13:41:00 +03:00
dnd.c weston-dnd --help works 2014-08-19 12:21:37 +03:00
editor.c editor: do not crash when text input manager is not available 2014-09-17 13:55:24 +03:00
eventdemo.c weston-eventdemo --help works 2014-08-19 12:19:16 +03:00
flower.c Clients: Fix memleak issues in various clients of weston 2014-06-24 10:22:43 -07:00
fullscreen.c Clients: Fix memleak issues in various clients of weston 2014-06-24 10:22:43 -07:00
gears.c gears: fix invalid calculation of the first FPS 2014-08-18 15:27:16 +03:00
glmatrix.c Add signedness warning flag and fix fallout 2012-03-30 11:52:39 -04:00
image.c image: don't print redundant error 2014-09-11 13:11:29 +03:00
keyboard.c keyboard: do not crash when input panel is not available 2014-09-17 13:52:09 +03:00
matrix3.xpm clients: import glmatrix.c and matrix3.xpm 2011-11-18 14:45:04 +02:00
multi-resource.c multi-resource: remove an unnecessary call of wl_display_get_fd() 2014-08-28 13:08:43 +03:00
nested-client.c Make sure config.h is included before any system headers 2014-04-07 10:22:28 -07:00
nested.c Made weston-nested --help work 2014-08-19 12:19:16 +03:00
presentation-shm.c clients: add presentation-shm demo 2014-09-30 13:02:20 +03:00
resizor.c clients: Remove the window / user parameters from the menu function 2014-05-18 13:54:15 -07:00
scaler.c weston-scaler --help works even if not run inside wayland 2014-08-19 12:21:44 +03:00
screenshot.c screenshooter: Add missing newline and use program_invocation_short_name 2013-08-12 22:15:38 -07:00
simple-damage.c xdg-shell: bump experimental protocol version 2014-08-21 17:47:20 +03:00
simple-egl.c simple-egl: fix opaque and 16 bits mode options 2014-08-28 13:27:48 +03:00
simple-shm.c simple-shm: remove an unnecessary call of wl_display_get_fd() 2014-08-28 11:56:29 +03:00
simple-touch.c simple-touch: Handle multiple seats properly 2014-05-09 12:50:11 -07:00
smoke.c smoke: fix valgrind invalid read errors 2014-11-11 12:59:43 +02:00
stacking.c Clients: Fix memleak issues in various clients of weston 2014-06-24 10:22:43 -07:00
subsurfaces.c Made weston-subsurfaces --help work 2014-08-19 12:19:17 +03:00
terminal.c weston-terminal --help and other command-line options 2014-08-19 12:19:17 +03:00
transformed.c Clients: Fix memleak issues in various clients of weston 2014-06-24 10:22:43 -07:00
weston-info.c weston-info: report presentation clock 2014-09-30 11:37:02 +03:00
weston-simple-im.c Replace deprecated xkbcommon symbols with current names 2014-08-20 01:05:13 -07:00
window.c window : compare version and call appropriate destructor 2014-11-04 15:27:07 +02:00
window.h clients: Allow creating a "detached" menu 2014-05-23 09:37:19 -07:00
wscreensaver-glue.c screensaver: fix decoding of transparency in xpm files 2012-09-06 21:08:12 -04:00
wscreensaver-glue.h Never include wayland-util.h directly 2011-11-22 09:35:14 -05:00
wscreensaver.c Made weston-screensaver --help work 2014-08-19 12:19:17 +03:00
wscreensaver.h Make sure config.h is included before any system headers 2014-04-07 10:22:28 -07:00