From 4358361e031acb22c86e441048e41fed221ba6f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Lavall=C3=A9e?= Date: Thu, 1 Nov 2018 16:47:25 -0700 Subject: [PATCH] Update vtt.c cue_settings uninitialized variable Error C4703 potentially uninitialized local pointer variable 'cue_settings' used ... libcaption\src\vtt.c 278 Though all code paths seem to initialize it. `parse_timestamps` always fill it in. And when that is called, `block_type` is set `VTT_CUE` which is the only path that uses it afterward. --- src/vtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vtt.c b/src/vtt.c index 23aa10d..6cf1579 100644 --- a/src/vtt.c +++ b/src/vtt.c @@ -188,7 +188,7 @@ vtt_t* _vtt_parse(const utf8_char_t* data, size_t size, int srt_mode) vtt_t* vtt = NULL; double str_pts = 0, end_pts = 0; size_t line_length = 0, trimmed_length = 0; - char* cue_settings; + char* cue_settings = NULL; enum VTT_BLOCK_TYPE block_type; size_t cue_id_length = 0; const utf8_char_t* cue_id = NULL;