summaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-07 23:05:57 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-09 03:51:19 +0200
commit23edd41a0d6994cb5d9983d8f035e8eef78960ad (patch)
treea20daefccbc8fc0102b21f38cdc1cca4dce5319b /doc/examples
parent9244b839b788e4677019041907ff5a4378a23490 (diff)
downloadffmpeg-streaming-23edd41a0d6994cb5d9983d8f035e8eef78960ad.zip
ffmpeg-streaming-23edd41a0d6994cb5d9983d8f035e8eef78960ad.tar.gz
doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/decode_video.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c
index 613bc5c..4377fd4 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);
}
OpenPOWER on IntegriCloud