doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9244b839b7
commit
23edd41a0d
@ -74,7 +74,7 @@ static void decode(AVCodecContext *dec_ctx, AVFrame *frame, AVPacket *pkt,
|
|||||||
|
|
||||||
/* the picture is allocated by the decoder. no need to
|
/* the picture is allocated by the decoder. no need to
|
||||||
free it */
|
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],
|
pgm_save(frame->data[0], frame->linesize[0],
|
||||||
frame->width, frame->height, buf);
|
frame->width, frame->height, buf);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user