summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-17 07:26:12 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-17 07:26:12 +0000
commitf5e06db39c42cbd4b98aebb6d971acf2cc086619 (patch)
tree9fd95406f7478ffbbbb9450ec4cddfcdb5f1ff5b /ext
parent842e0b05ea3d31ad4c4392076dd5ef99d51737c5 (diff)
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
Diffstat (limited to 'ext')
-rw-r--r--ext/zlib/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 223879c..af45b6f 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -584,7 +584,7 @@ struct zstream_run_args {
static voidpf
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
deflate is performing a conditional jump that depends on an
uninitialized value. Isn't that a bug?