From 52f573d629754c9a9cf842ab4b810f933d13e11f Mon Sep 17 00:00:00 2001 From: Jani Taskinen Date: Wed, 9 Dec 2009 20:33:31 +0000 Subject: [PATCH] - Fixed bug #47179 (gzuncompress does not report expcted error) --- ext/zlib/tests/gzuncompress_error1.phpt | 11 +++-------- ext/zlib/zlib.c | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ext/zlib/tests/gzuncompress_error1.phpt b/ext/zlib/tests/gzuncompress_error1.phpt index 8f9a42969f..99c419314d 100644 --- a/ext/zlib/tests/gzuncompress_error1.phpt +++ b/ext/zlib/tests/gzuncompress_error1.phpt @@ -1,7 +1,5 @@ --TEST-- Test gzuncompress() function : error conditions ---XFAIL-- -Test will fail until bug #47179 resolved; no error when $length too small --SKIPIF-- avail_in; + buffer.size = (max && (max < Z->avail_in)) ? max : Z->avail_in; do { - if ((max && (max < buffer.used)) || !(buffer.aptr = erealloc_recoverable(buffer.data, buffer.size))) { + if ((max && (max <= buffer.used)) || !(buffer.aptr = erealloc_recoverable(buffer.data, buffer.size))) { status = Z_MEM_ERROR; } else { buffer.data = buffer.aptr; -- 2.50.1