[FFmpeg-devel] [PATCH] avcodec: fix uninitialized variable read

wm4 nfxjfg at googlemail.com
Tue Mar 7 10:56:56 EET 2017


This cna happen if the user tries to call the new decode API for
subtitles.

Fixes CID 1402071.
---
 libavcodec/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index db3adb18d4..31586d51c5 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -2774,7 +2774,7 @@ void avsubtitle_free(AVSubtitle *sub)
 
 static int do_decode(AVCodecContext *avctx, AVPacket *pkt)
 {
-    int got_frame;
+    int got_frame = 0;
     int ret;
 
     av_assert0(!avctx->internal->buffer_frame->buf[0]);
-- 
2.11.0



More information about the ffmpeg-devel mailing list