aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-20 12:52:49 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-10-20 12:52:49 +0200
commit1ba174f461bab97d4e9d0d81f43d788afeae6639 (patch)
tree2af94299aae474f3a9a01565193514a9e77e3322 /libavformat/hlsenc.c
parent96ad55df5bfa594defa2d57970686df3106a9ffa (diff)
downloadffmpeg-1ba174f461bab97d4e9d0d81f43d788afeae6639.tar.gz
avformat/hlsenc: Don't use uninitialized buffer in av_stristr()
Introduced in a2b1dd0ce301450a47c972745a6b33c4c273aa5d. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 49c4ab5966..22077073bd 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -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) {