Mercurial > mplayer.hg
changeset 1078:874ba7049c1a
sprintf possible buffer overflow fixes
author | al3x |
---|---|
date | Sat, 09 Jun 2001 17:53:54 +0000 |
parents | c433e62cb3de |
children | 1e0da351feaa |
files | libvo/vo_png.c |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_png.c Sat Jun 09 17:41:31 2001 +0000 +++ b/libvo/vo_png.c Sat Jun 09 17:53:54 2001 +0000 @@ -199,8 +199,7 @@ 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 @@ 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 @@ static void check_events(void) { } - - -