sprintf->snprintf

Originally committed as revision 3824 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2005-01-12 01:02:13 +00:00
parent 2fc8ea249f
commit 813af36b51
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ void Process(void *ctx, AVPicture *picture, enum PixelFormat pix_fmt, int width,
FILE *f;
char fname[256];
sprintf(fname, "%s/fishimg%ld_%lld.ppm", ci->dir, time(0), pts);
snprintf(fname, sizeof(fname), "%s/fishimg%ld_%lld.ppm", ci->dir, time(0), pts);
f = fopen(fname, "w");
if (f) {
fprintf(f, "P6 %d %d 255\n", width, height);