mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 14:00:29 +01:00
Don't access event buffer after realloc
realloc() may free the original event buffer, don't access it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
4c41c6b2da
commit
faee8fe1a7
1 changed files with 1 additions and 1 deletions
|
|
@ -887,7 +887,7 @@ libinput_post_event(struct libinput *libinput,
|
|||
move_len = libinput->events_len - libinput->events_out;
|
||||
new_out = events_len - move_len;
|
||||
memmove(events + new_out,
|
||||
libinput->events + libinput->events_out,
|
||||
events + libinput->events_out,
|
||||
move_len * sizeof *events);
|
||||
libinput->events_out = new_out;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue