[FFmpeg-devel] [PATCH 2/5] CodeAi generated fix for CWE 457 Uninitialized Variable
C0deAi
techsupport at mycode.ai
Wed Mar 7 00:42:20 EET 2018
Prevent uninitialized value 'pb[1]' being passed as an
argument on line 143.
Signed-off-by: C0deAi <benjamin.bales at assrc.us>
---
libavformat/img2enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index a09cc8e..6cfbaa2 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -81,7 +81,7 @@ static int write_header(AVFormatContext *s)
static int write_packet(AVFormatContext *s, AVPacket *pkt)
{
VideoMuxData *img = s->priv_data;
- AVIOContext *pb[4];
+ AVIOContext *pb[4] = {0};
char filename[1024];
AVCodecParameters *par = s->streams[pkt->stream_index]->codecpar;
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(par->format);
--
2.7.4
More information about the ffmpeg-devel
mailing list