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

Andreas Rheinhardt git at videolan.org
Thu Apr 8 15:15:44 EEST 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Apr  8 14:06:24 2021 +0200| [44c8b6750231137d5ba650d6cc149c9c23ae4c68] | committer: Andreas Rheinhardt

avformat/webvttenc: Fix use of uninitialized variable

Happened in 9168a1c0e67b5c31727b12329b6f52d2bb5e0a14.

Reviewed-by: Anton Khirnov <anton at khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=44c8b6750231137d5ba650d6cc149c9c23ae4c68
---

 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;



More information about the ffmpeg-cvslog mailing list