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>
This commit is contained in:
Timo Rothenpieler 2018-03-26 20:32:00 +08:00 committed by Steven Liu
parent ac6e27d74f
commit 3914c8e0e6
1 changed files with 2 additions and 1 deletions

View File

@ -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;