diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-07 23:05:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-04-09 03:51:19 +0200 |
commit | 23edd41a0d6994cb5d9983d8f035e8eef78960ad (patch) | |
tree | a20daefccbc8fc0102b21f38cdc1cca4dce5319b | |
parent | 9244b839b788e4677019041907ff5a4378a23490 (diff) | |
download | ffmpeg-23edd41a0d6994cb5d9983d8f035e8eef78960ad.tar.gz |
doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | doc/examples/decode_video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c index 613bc5cc88..4377fd49e0 100644 --- a/doc/examples/decode_video.c +++ b/doc/examples/decode_video.c @@ -74,7 +74,7 @@ static void decode(AVCodecContext *dec_ctx, AVFrame *frame, AVPacket *pkt, /* the picture is allocated by the decoder. no need to free it */ - snprintf(buf, sizeof(buf), filename, dec_ctx->frame_number); + snprintf(buf, sizeof(buf), "%s-%d", filename, dec_ctx->frame_number); pgm_save(frame->data[0], frame->linesize[0], frame->width, frame->height, buf); } |