]> granicus.if.org Git - handbrake/commitdiff
libhb: fix potential crash in filters
authorjstebbins <jstebbins.hb@gmail.com>
Wed, 20 Aug 2014 17:25:37 +0000 (17:25 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Wed, 20 Aug 2014 17:25:37 +0000 (17:25 +0000)
If the job aborts right away, an uninitialized buffer is closed and crash!

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6326 b64f7644-9d1e-0410-96f1-a4d463321fa5

libhb/work.c

index 240ccbb92fa1237ec0a4c9615dd5a4e846287e1f..88f4be2485401094e80e49bf9bb62d0dd67ca8db 100644 (file)
@@ -1752,7 +1752,7 @@ static void work_loop( void * _w )
 static void filter_loop( void * _f )
 {
     hb_filter_object_t * f = _f;
-    hb_buffer_t      * buf_in, * buf_out;
+    hb_buffer_t      * buf_in, * buf_out = NULL;
 
     while( !*f->done && f->status != HB_FILTER_DONE )
     {