summaryrefslogtreecommitdiffstats
path: root/libhb/fifo.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-09-12 15:54:00 +0000
committerjstebbins <[email protected]>2012-09-12 15:54:00 +0000
commit001b8708d3b15564c7096a21be769b9328bc2cb8 (patch)
treed77148f3096a479999af72cd05b3c9cd6d300652 /libhb/fifo.c
parent6af5392e79799d76135e4b006c5ea817d5af01df (diff)
libhb: fix potential invalid memory access in decomb (again)
I missed a spot where an even wider left/right margin is needed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4961 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/fifo.c')
-rw-r--r--libhb/fifo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libhb/fifo.c b/libhb/fifo.c
index 1f0d2ef97..8fcde27b6 100644
--- a/libhb/fifo.c
+++ b/libhb/fifo.c
@@ -334,6 +334,7 @@ hb_buffer_t * hb_buffer_init( int size )
hb_lock(buffers.lock);
buffers.allocated += b->alloc;
hb_unlock(buffers.lock);
+ memset(b->data, 0, b->alloc);
}
return b;
}
@@ -346,6 +347,7 @@ void hb_buffer_realloc( hb_buffer_t * b, int size )
size = size_to_pool( size )->buffer_size;
b->data = realloc( b->data, size );
b->alloc = size;
+ memset(b->data, 0, b->alloc);
hb_lock(buffers.lock);
buffers.allocated += size - orig;