From: Tim Walker Date: Tue, 8 Jan 2019 17:57:40 +0000 (+0100) Subject: decavcodec: fix more potential uses of uninitialized variables X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c7e2e65ae25d11fe5ac3732f40a66dc7899e1a6;p=handbrake decavcodec: fix more potential uses of uninitialized variables Fixes a crash I experienced locally following 76f14dad963db46961ce3d425a102ac3d898ce10 Inspired by 3c95342a8cdf5b3b03d8b5e94ec099b0bc6a4f35 --- diff --git a/libhb/decavcodec.c b/libhb/decavcodec.c index 1c3f51070..9afe318ed 100644 --- a/libhb/decavcodec.c +++ b/libhb/decavcodec.c @@ -427,8 +427,8 @@ static void decavcodecClose( hb_work_object_t * w ) static void audioParserFlush(hb_work_object_t * w) { hb_work_private_t * pv = w->private_data; - uint8_t * pout; - int pout_len; + uint8_t * pout = NULL; + int pout_len = 0; int64_t parser_pts; do @@ -1723,8 +1723,8 @@ static void videoParserFlush(hb_work_object_t * w) { hb_work_private_t * pv = w->private_data; int result; - uint8_t * pout; - int pout_len; + uint8_t * pout = NULL; + int pout_len = 0; int64_t parser_pts, parser_dts; do @@ -1842,8 +1842,8 @@ static int decavcodecvWork( hb_work_object_t * w, hb_buffer_t ** buf_in, } for (pos = 0; pos < in->size; pos += len) { - uint8_t * pout; - int pout_len; + uint8_t * pout = NULL; + int pout_len = 0; int64_t parser_pts, parser_dts; if (pv->parser)