[FFmpeg-devel] [PATCH] avformat/webvttenc: Fix use of uninitialized variable

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Apr 8 15:07:55 EEST 2021


Happened in 9168a1c0e67b5c31727b12329b6f52d2bb5e0a14.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavformat/webvttenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/webvttenc.c b/libavformat/webvttenc.c
index 809fead69f..2bc86041a7 100644
--- a/libavformat/webvttenc.c
+++ b/libavformat/webvttenc.c
@@ -87,7 +87,7 @@ static int webvtt_write_packet(AVFormatContext *ctx, AVPacket *pkt)
     settings = av_packet_get_side_data(pkt, AV_PKT_DATA_WEBVTT_SETTINGS,
                                        &settings_size);
 
-    if (settings_size_int > INT_MAX)
+    if (settings_size > INT_MAX)
         return AVERROR(EINVAL);
 
     settings_size_int = settings_size;
-- 
2.27.0



More information about the ffmpeg-devel mailing list