Skip to content

Commit

Permalink
SDL_EVDEV_kbd_init: uninitialized data for ioctl (Bug 4530)
Browse files Browse the repository at this point in the history
Only two chars are used but the full prototype is:

int tioclinux(struct tty_struct *tty, unsigned long arg)

==5010== Syscall param ioctl(TIOCLINUX) points to uninitialised byte(s)
==5010==    at 0x53E73C7: ioctl (syscall-template.S:78)
==5010==    by 0x4A887DA: SDL_EVDEV_Init (SDL_evdev.c:163)
==5010==    by 0x4A7D157: KMSDRM_VideoInit (SDL_kmsdrmvideo.c:509)
==5010==    by 0x497D959: SDL_VideoInit_REAL (SDL_video.c:529)
==5010==    by 0x487ACBC: SDL_InitSubSystem_REAL (SDL.c:171)
==5010==    by 0x487B052: SDL_Init_REAL (SDL.c:256)
==5010==    by 0x488F7D6: SDL_Init (SDL_dynapi_procs.h:85)
  • Loading branch information
1bsyl committed Mar 12, 2019
1 parent b28e956 commit 052b4f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/linux/SDL_evdev_kbd.c
Expand Up @@ -345,7 +345,7 @@ SDL_EVDEV_kbd_init(void)
SDL_EVDEV_keyboard_state *kbd;
int i;
char flag_state;
char shift_state[2] = {TIOCL_GETSHIFTSTATE, 0};
char shift_state[ sizeof (long) ] = {TIOCL_GETSHIFTSTATE, 0};

kbd = (SDL_EVDEV_keyboard_state *)SDL_calloc(1, sizeof(*kbd));
if (!kbd) {
Expand Down

0 comments on commit 052b4f2

Please sign in to comment.