Browse Source

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>
tags/n3.3
Michael Niedermayer 8 years ago
parent
commit
7182fbc471
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      doc/examples/decode_video.c

+ 1
- 1
doc/examples/decode_video.c View File

@@ -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…
Cancel
Save