]> git.sesse.net Git - ffmpeg/commitdiff
avformat/hlsenc: Don't use uninitialized buffer in av_stristr()
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 20 Oct 2020 10:52:49 +0000 (12:52 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 20 Oct 2020 10:52:49 +0000 (12:52 +0200)
Introduced in a2b1dd0ce301450a47c972745a6b33c4c273aa5d.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/hlsenc.c

index 49c4ab596660f05eccee31e619d69a933cd24c15..22077073bd3f5273fc6c546f3eedfd440ccc62b4 100644 (file)
@@ -380,7 +380,8 @@ static void write_codec_attr(AVStream *st, VariantStream *vs)
             profile != FF_PROFILE_UNKNOWN &&
             level != FF_LEVEL_UNKNOWN) {
             snprintf(attr, sizeof(attr), "%s.%d.4.L%d.B01", av_fourcc2str(st->codecpar->codec_tag), profile, level);
-        }
+        } else
+            goto fail;
     } else if (st->codecpar->codec_id == AV_CODEC_ID_MP2) {
         snprintf(attr, sizeof(attr), "mp4a.40.33");
     } else if (st->codecpar->codec_id == AV_CODEC_ID_MP3) {