Skip to content

Commit

Permalink
(ffmpeg_core.c) passing a format string without the arguments to log_cb
Browse files Browse the repository at this point in the history
can result in a crash.
  • Loading branch information
aliaspider committed Jun 4, 2016
1 parent 94e16e6 commit 5e5e1e6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cores/libretro-ffmpeg/ffmpeg_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ static struct
#ifdef HAVE_SSA
static void ass_msg_cb(int level, const char *fmt, va_list args, void *data)
{
char buffer[4096];
(void)data;

if (level < 6)
log_cb(RETRO_LOG_INFO, fmt);
{
vsnprintf(buffer, sizeof(buffer), fmt, args);
log_cb(RETRO_LOG_INFO, "%s\n", buffer);
}
}
#endif

Expand Down

0 comments on commit 5e5e1e6

Please sign in to comment.