[FFmpeg-cvslog] avformat/hlsenc: initialize saveptrs

Timo Rothenpieler git at videolan.org
Tue Mar 27 01:56:45 EEST 2018


ffmpeg | branch: master | Timo Rothenpieler <timo at rothenpieler.org> | Mon Mar 26 20:32:00 2018 +0800| [3914c8e0e6bac4ce3b3573c6fd3098e2aa4c9ff5] | committer: Steven Liu

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 at akamai.com>
Signed-off-by: Steven Liu <lq at onvideo.cn>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

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

 libavformat/hlsenc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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;
 



More information about the ffmpeg-cvslog mailing list