ffmpeg | branch: master | Michael Niedermayer <mich...@niedermayer.cc> | Fri Apr 7 23:05:57 2017 +0200| [23edd41a0d6994cb5d9983d8f035e8eef78960ad] | committer: Michael Niedermayer
doc/examples/decode_video: Fix format string vulnerability Fixes: CID1404843 Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=23edd41a0d6994cb5d9983d8f035e8eef78960ad --- doc/examples/decode_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog