mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-31 20:02:42 +00:00
doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 23edd41a0d
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
0b4d87fad1
commit
7182fbc471
@ -64,7 +64,7 @@ static int decode_write_frame(const char *outfilename, AVCodecContext *avctx,
|
||||
fflush(stdout);
|
||||
|
||||
/* the picture is allocated by the decoder, no need to free it */
|
||||
snprintf(buf, sizeof(buf), outfilename, *frame_count);
|
||||
snprintf(buf, sizeof(buf), "%s-%d", outfilename, *frame_count);
|
||||
pgm_save(frame->data[0], frame->linesize[0],
|
||||
frame->width, frame->height, buf);
|
||||
(*frame_count)++;
|
||||
|
Loading…
Reference in New Issue
Block a user