From: Damiano Galassi Date: Mon, 9 Jan 2017 08:18:03 +0000 (+0100) Subject: libhb: check if decvobsub.c private_data is not null before accessing one of its... X-Git-Tag: 1.0.2~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a5db2e9eb49ad2ef3db29b37fb3e6e1bec62f0b;p=handbrake libhb: check if decvobsub.c private_data is not null before accessing one of its member. Fix a crash when calling decsubClose if the decoder had not been initialized yet. (cherry picked from commit 008b1f47941e6479e5db106653232fb886196238) --- diff --git a/libhb/decvobsub.c b/libhb/decvobsub.c index 73401b9f3..009c12e96 100644 --- a/libhb/decvobsub.c +++ b/libhb/decvobsub.c @@ -196,7 +196,7 @@ void decsubClose( hb_work_object_t * w ) { hb_work_private_t * pv = w->private_data; - if ( pv->buf ) + if ( pv && pv->buf ) hb_buffer_close( &pv->buf ); free( w->private_data ); }