aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2018-03-26 20:32:00 +0800
committerSteven Liu <lq@chinaffmpeg.org>2018-03-27 06:56:27 +0800
commit3914c8e0e6bac4ce3b3573c6fd3098e2aa4c9ff5 (patch)
treee917e18cd491f262c9f56bd9de3211961e10dcca /libavformat/hlsenc.c
parentac6e27d74f6a413d400c228b0eb2d3af32c1ea76 (diff)
downloadffmpeg-3914c8e0e6bac4ce3b3573c6fd3098e2aa4c9ff5.tar.gz
avformat/hlsenc: initialize saveptrs
av_strtok calls strspn on a non-NULL *saveptr, so not NULL initializing it is an issue. Fixes CID #1428568 Reviewed-by: Karthick Jeyapal <kjeyapal@akamai.com> Signed-off-by: Steven Liu <lq@onvideo.cn> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
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 34fa848466..2a54b4342e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1888,7 +1888,8 @@ static int parse_cc_stream_mapstring(AVFormatContext *s)
{
HLSContext *hls = s->priv_data;
int nb_ccstreams;
- char *p, *q, *saveptr1, *saveptr2, *ccstr, *keyval;
+ char *p, *q, *ccstr, *keyval;
+ char *saveptr1 = NULL, *saveptr2 = NULL;
const char *val;
ClosedCaptionsStream *ccs;