mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Prevent crash by checking if msg is NULL before doing strlcpy call
This commit is contained in:
parent
9a87dabca1
commit
feacc56fff
@ -2121,7 +2121,7 @@ void video_driver_frame(const void *data, unsigned width,
|
||||
|
||||
video_driver_msg[0] = '\0';
|
||||
|
||||
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg))
|
||||
if (runloop_ctl(RUNLOOP_CTL_MSG_QUEUE_PULL, &msg) && msg)
|
||||
strlcpy(video_driver_msg, msg, sizeof(video_driver_msg));
|
||||
|
||||
if (!current_video || !current_video->frame(
|
||||
|
Loading…
Reference in New Issue
Block a user