summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-07-04 18:29:27 +0000
committerjstebbins <[email protected]>2010-07-04 18:29:27 +0000
commitab984f4f5c751f9ca7e62c3adba3e4f047198f82 (patch)
treeede80002e247f55c4d6eb15edc7492d9fb9e33f8 /libhb
parent7139bd97551c5f8a521295599f0bf294a00cd3dd (diff)
fix crash due to processing invalid buf_out from work
if the work function doesn't null out buf_out (as decavcodecvWork) then buf_out can be garbage, or worse a prevously used buffer. I'm flabbergasted this has never bitten me before. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3426 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb')
-rw-r--r--libhb/work.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libhb/work.c b/libhb/work.c
index d8fc4d98d..68bb6fe2f 100644
--- a/libhb/work.c
+++ b/libhb/work.c
@@ -1181,6 +1181,9 @@ static void work_loop( void * _w )
break;
}
+ // Invalidate buf_out so that if there is no output
+ // we don't try to pass along junk.
+ buf_out = NULL;
w->status = w->work( w, &buf_in, &buf_out );
// Propagate any chapter breaks for the worker if and only if the