mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 23edd41a0d6994cb5d9983d8f035e8eef78960ad) 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…
x
Reference in New Issue
Block a user