don't try to inflate empty strings (and stop segfaulting!)

This commit is contained in:
Antony Dovgal 2006-06-26 22:53:10 +00:00
parent fd1679e7f0
commit 3d97f45bc4

View File

@ -531,6 +531,10 @@ PHP_FUNCTION(gzinflate)
return;
}
if (!data_len) {
RETURN_FALSE;
}
if (limit < 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "length (%ld) must be greater or equal zero", limit);
RETURN_FALSE;