# HG changeset patch # User al3x # Date 992262886 0 # Node ID 7a6be90408ea2d79367ab7e6c6aa9edd7c9827a2 # Parent 545a55a5088580327a55b0898ce06faf2d89b2d7 possible buffer overflows fixed diff -r 545a55a50885 -r 7a6be90408ea libvo/vo_pgm.c --- a/libvo/vo_pgm.c Mon Jun 11 00:12:09 2001 +0000 +++ b/libvo/vo_pgm.c Mon Jun 11 12:34:46 2001 +0000 @@ -47,7 +47,7 @@ image_width = width; image=malloc(width*height*3/2); - sprintf (header, "P5\n\n%d %d\n255\n", width, height*3/2); + snprintf (header, 1024, "P5\n\n%d %d\n255\n", width, height*3/2); return 0; } @@ -63,7 +63,7 @@ FILE * f; int i; - sprintf (vo_pgm_filename, "%08d.pgm", framenum++); + snprintf (vo_pgm_filename, 24, "%08d.pgm", framenum++); f = fopen (vo_pgm_filename, "wb"); if (f == NULL) return; fwrite (header, strlen (header), 1, f);