mirror of
https://github.com/mpv-player/mpv
synced 2025-01-01 20:32:13 +00:00
sprintf possible buffer overflow fixes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1079 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
823dfcfc39
commit
6b853ba7b8
@ -199,8 +199,7 @@ static uint32_t draw_frame(uint8_t * src[])
|
||||
struct pngdata png;
|
||||
png_byte *row_pointers[image_height];
|
||||
|
||||
sprintf (buf, "%08d.png", ++framenum);
|
||||
//printf("%s\n", buf);
|
||||
snprintf (buf, 100, "%08d.png", ++framenum);
|
||||
|
||||
png = create_png(buf);
|
||||
|
||||
@ -231,8 +230,7 @@ static void flip_page (void)
|
||||
|
||||
if(image_format == IMGFMT_YV12) {
|
||||
|
||||
sprintf (buf, "%08d.png", ++framenum);
|
||||
//printf("%s\n", buf);
|
||||
snprintf (buf, 100, "%08d.png", ++framenum);
|
||||
|
||||
png = create_png(buf);
|
||||
|
||||
@ -285,6 +283,3 @@ uninit(void)
|
||||
static void check_events(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user