From d56de24ce7665ed70ffca2f2d1ed197a16a3ab3c Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Fri, 28 Jan 2011 04:19:40 +0000 Subject: [PATCH] Fixed bug #53854 (Missing constants for compression type). Patch by Richard Quadling. --- NEWS | 1 + ext/zip/php_zip.c | 6 +++++ ext/zip/tests/bug53854.phpt | 44 +++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 ext/zip/tests/bug53854.phpt diff --git a/NEWS b/NEWS index fce0188ccba..66491dc2c8e 100644 --- a/NEWS +++ b/NEWS @@ -146,6 +146,7 @@ gmail dot com, Gustavo) . Fixed bug #53166 (Missing parameters in docs and reflection definition). (Richard) + . Fixed bug #53854 (Missing constants for compression type). (Richard, Adam) 06 Jan 2011, PHP 5.3.5 - Fixed Bug #53632 (infinite loop with x87 fpu). (CVE-2010-4645) (Scott, diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index 6d3240f1d50..f46a1475dc9 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2754,6 +2754,12 @@ static PHP_MINIT_FUNCTION(zip) REGISTER_ZIP_CLASS_CONST_LONG("CM_DEFLATE", ZIP_CM_DEFLATE); REGISTER_ZIP_CLASS_CONST_LONG("CM_DEFLATE64", ZIP_CM_DEFLATE64); REGISTER_ZIP_CLASS_CONST_LONG("CM_PKWARE_IMPLODE", ZIP_CM_PKWARE_IMPLODE); + REGISTER_ZIP_CLASS_CONST_LONG("CM_BZIP2", ZIP_CM_BZIP2); + REGISTER_ZIP_CLASS_CONST_LONG("CM_LZMA", ZIP_CM_LZMA); + REGISTER_ZIP_CLASS_CONST_LONG("CM_TERSE", ZIP_CM_TERSE); + REGISTER_ZIP_CLASS_CONST_LONG("CM_LZ77", ZIP_CM_LZ77); + REGISTER_ZIP_CLASS_CONST_LONG("CM_WAVPACK", ZIP_CM_WAVPACK); + REGISTER_ZIP_CLASS_CONST_LONG("CM_PPMD", ZIP_CM_PPMD); /* Error code */ REGISTER_ZIP_CLASS_CONST_LONG("ER_OK", ZIP_ER_OK); /* N No error */ diff --git a/ext/zip/tests/bug53854.phpt b/ext/zip/tests/bug53854.phpt new file mode 100644 index 00000000000..cd8ae7e5f33 --- /dev/null +++ b/ext/zip/tests/bug53854.phpt @@ -0,0 +1,44 @@ +--TEST-- +Bug #53854 (Missing constants for compression type) +--SKIPIF-- + +--FILE-- +