ext/zlib/zlib.c (zlib_mem_alloc): check overflow
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
842e0b05ea
commit
f5e06db39c
@ -1,3 +1,7 @@
|
|||||||
|
Wed Sep 17 16:22:58 2014 Eric Wong <e@80x24.org>
|
||||||
|
|
||||||
|
* ext/zlib/zlib.c (zlib_mem_alloc): check overflow
|
||||||
|
|
||||||
Wed Sep 17 11:33:35 2014 Laurent Arnoud <laurent@spkdev.net>
|
Wed Sep 17 11:33:35 2014 Laurent Arnoud <laurent@spkdev.net>
|
||||||
|
|
||||||
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
|
* test/fiddle/test_import.rb (Fiddle::TestImport#test_sizeof):
|
||||||
|
@ -584,7 +584,7 @@ struct zstream_run_args {
|
|||||||
static voidpf
|
static voidpf
|
||||||
zlib_mem_alloc(voidpf opaque, uInt items, uInt size)
|
zlib_mem_alloc(voidpf opaque, uInt items, uInt size)
|
||||||
{
|
{
|
||||||
voidpf p = xmalloc(items * size);
|
voidpf p = xmalloc2(items, size);
|
||||||
/* zlib FAQ: Valgrind (or some similar memory access checker) says that
|
/* zlib FAQ: Valgrind (or some similar memory access checker) says that
|
||||||
deflate is performing a conditional jump that depends on an
|
deflate is performing a conditional jump that depends on an
|
||||||
uninitialized value. Isn't that a bug?
|
uninitialized value. Isn't that a bug?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user