Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/bz2 bz2_filter.c

2009-02-05 Thread Jani Taskinen

Greg Beaver wrote:

cellog  Tue Feb  3 18:56:26 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src	NEWS 
/php-src/ext/bz2	bz2_filter.c 
  Log:

  Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress 
after end of stream)
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.484r2=1.2027.2.547.2.965.2.485diff_format=u

Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.484 
php-src/NEWS:1.2027.2.547.2.965.2.485
--- php-src/NEWS:1.2027.2.547.2.965.2.484   Tue Feb  3 18:29:25 2009
+++ php-src/NEWSTue Feb  3 18:56:25 2009
@@ -6,7 +6,8 @@
 - Fixed bug #47085 (rename() returns true even if the file in PHAR does not 
exist). (Greg)
 - Fixed bug #47031 (Fix constants in DualIterator example). (Etienne)
 - Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
-
+- Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress 
after
+  end of stream). (Greg)


Re-Fixed ? Please don't invent stuff like this into NEWS. It's either 
Fixed or not.


Also, why isn't this fix MFH'd to PHP_5_2?

--Jani



 29 Jan 2009, PHP 5.3.0 Beta 1
 - Upgraded bundled sqlite to version 3.6.10. (Scott, Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/bz2/bz2_filter.c?r1=1.3.2.2.2.5.2.6r2=1.3.2.2.2.5.2.7diff_format=u
Index: php-src/ext/bz2/bz2_filter.c
diff -u php-src/ext/bz2/bz2_filter.c:1.3.2.2.2.5.2.6 
php-src/ext/bz2/bz2_filter.c:1.3.2.2.2.5.2.7
--- php-src/ext/bz2/bz2_filter.c:1.3.2.2.2.5.2.6Wed Dec 31 11:15:35 2008
+++ php-src/ext/bz2/bz2_filter.cTue Feb  3 18:56:26 2009
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: bz2_filter.c,v 1.3.2.2.2.5.2.6 2008/12/31 11:15:35 sebastian Exp $ */

+/* $Id: bz2_filter.c,v 1.3.2.2.2.5.2.7 2009/02/03 18:56:26 cellog Exp $ */
 
 #ifdef HAVE_CONFIG_H

 #include config.h
@@ -353,11 +353,14 @@
if (Z_TYPE_P(filterparams) == IS_ARRAY || 
Z_TYPE_P(filterparams) == IS_OBJECT) {
 
 if (SUCCESS == zend_hash_find(HASH_OF(filterparams), concatenated, sizeof(concatenated), (void **) tmpzval) ) {

-   SEPARATE_ZVAL(tmpzval);
-   convert_to_boolean_ex(tmpzval);
-   data-expect_concatenated = 
Z_LVAL_PP(tmpzval);
-   zval_ptr_dtor(tmpzval);
-   tmpzval = NULL;
+   zval tmp, *tmp2;
+
+   tmp = **tmpzval;
+   zval_copy_ctor(tmp);
+   tmp2 = tmp;
+   convert_to_boolean_ex(tmp2);
+   data-expect_concatenated = Z_LVAL(tmp);
+   tmpzval = NULL;
}
 
 zend_hash_find(HASH_OF(filterparams), small, sizeof(small), (void **) tmpzval);

@@ -366,10 +369,13 @@
}
 
 			if (tmpzval) {

-   SEPARATE_ZVAL(tmpzval);
-   convert_to_boolean_ex(tmpzval);
-   data-small_footprint = Z_LVAL_PP(tmpzval);
-   zval_ptr_dtor(tmpzval);
+   zval tmp, *tmp2;
+
+   tmp = **tmpzval;
+   zval_copy_ctor(tmp);
+   tmp2 = tmp;
+   convert_to_boolean_ex(tmp2);
+   data-small_footprint = Z_LVAL(tmp);
}
}
 
@@ -385,26 +391,31 @@

if (Z_TYPE_P(filterparams) == IS_ARRAY || 
Z_TYPE_P(filterparams) == IS_OBJECT) {
if (zend_hash_find(HASH_OF(filterparams), blocks, 
sizeof(blocks), (void**) tmpzval) == SUCCESS) {
/* How much memory to allocate (1 - 9) 
x 100kb */
-   SEPARATE_ZVAL(tmpzval);
-   convert_to_long_ex(tmpzval);
-   if (Z_LVAL_PP(tmpzval)  1 || 
Z_LVAL_PP(tmpzval)  9) {
+   zval tmp;
+   
+   tmp = **tmpzval;
+   zval_copy_ctor(tmp);
+   convert_to_long(tmp);
+   if (Z_LVAL(tmp)  1 || Z_LVAL(tmp)  9) 
{
php_error_docref(NULL TSRMLS_CC, 
E_WARNING, Invalid parameter given for number of blocks to allocate. (%ld), 
Z_LVAL_PP(tmpzval));
} else {
-   blockSize100k = 

Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/bz2 bz2_filter.c

2009-02-05 Thread Greg Beaver
Jani Taskinen wrote:
 Greg Beaver wrote:
 cellogTue Feb  3 18:56:26 2009 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-srcNEWS /php-src/ext/bz2bz2_filter.c   Log:
   Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to
 decompress after end of stream)
  
 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.484r2=1.2027.2.547.2.965.2.485diff_format=u

 Index: php-src/NEWS
 diff -u php-src/NEWS:1.2027.2.547.2.965.2.484
 php-src/NEWS:1.2027.2.547.2.965.2.485
 --- php-src/NEWS:1.2027.2.547.2.965.2.484Tue Feb  3 18:29:25 2009
 +++ php-src/NEWSTue Feb  3 18:56:25 2009
 @@ -6,7 +6,8 @@
  - Fixed bug #47085 (rename() returns true even if the file in PHAR
 does not exist). (Greg)
  - Fixed bug #47031 (Fix constants in DualIterator example). (Etienne)
  - Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
 -
 +- Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to
 decompress after
 +  end of stream). (Greg)

 Re-Fixed ? Please don't invent stuff like this into NEWS. It's
 either Fixed or not.
sorry for offending your delicate sensibilities.  Feel free to Re-Commit
with the corrected name for Fixed.
 Also, why isn't this fix MFH'd to PHP_5_2? 
The original fix was merged, minus the feature addition, but 5.2 went RC
yesterday, so I didn't think it wise to randomly commit.

Any other questions?

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/bz2 bz2_filter.c

2009-02-05 Thread Jani Taskinen

Greg Beaver kirjoitti:

Jani Taskinen wrote:

Greg Beaver wrote:

cellogTue Feb  3 18:56:26 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS /php-src/ext/bz2bz2_filter.c   Log:
  Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to
decompress after end of stream)
 
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.484r2=1.2027.2.547.2.965.2.485diff_format=u


Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.484
php-src/NEWS:1.2027.2.547.2.965.2.485
--- php-src/NEWS:1.2027.2.547.2.965.2.484Tue Feb  3 18:29:25 2009
+++ php-src/NEWSTue Feb  3 18:56:25 2009
@@ -6,7 +6,8 @@
 - Fixed bug #47085 (rename() returns true even if the file in PHAR
does not exist). (Greg)
 - Fixed bug #47031 (Fix constants in DualIterator example). (Etienne)
 - Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
-
+- Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to
decompress after
+  end of stream). (Greg)

Re-Fixed ? Please don't invent stuff like this into NEWS. It's
either Fixed or not.

sorry for offending your delicate sensibilities.  Feel free to Re-Commit
with the corrected name for Fixed.
Also, why isn't this fix MFH'd to PHP_5_2? 

The original fix was merged, minus the feature addition, but 5.2 went RC
yesterday, so I didn't think it wise to randomly commit.

Any other questions?


Yes, did your gerbil die or what's with the attitude?

--Jani



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/bz2 bz2_filter.c

2009-02-05 Thread Greg Beaver
Jani Taskinen wrote:
 Greg Beaver kirjoitti:
 Jani Taskinen wrote:
 Greg Beaver wrote:
 cellogTue Feb  3 18:56:26 2009 UTC

   Modified files:  (Branch: PHP_5_3)
 /php-srcNEWS /php-src/ext/bz2bz2_filter.c   Log:
   Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to
 decompress after end of stream)
  
 http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.484r2=1.2027.2.547.2.965.2.485diff_format=u


 Index: php-src/NEWS
 diff -u php-src/NEWS:1.2027.2.547.2.965.2.484
 php-src/NEWS:1.2027.2.547.2.965.2.485
 --- php-src/NEWS:1.2027.2.547.2.965.2.484Tue Feb  3 18:29:25 2009
 +++ php-src/NEWSTue Feb  3 18:56:25 2009
 @@ -6,7 +6,8 @@
  - Fixed bug #47085 (rename() returns true even if the file in PHAR
 does not exist). (Greg)
  - Fixed bug #47031 (Fix constants in DualIterator example). (Etienne)
  - Fixed bug #46347 (parse_ini_file() doesn't support * in keys).
 (Nuno)
 -
 +- Re-Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to
 decompress after
 +  end of stream). (Greg)
 Re-Fixed ? Please don't invent stuff like this into NEWS. It's
 either Fixed or not.
 sorry for offending your delicate sensibilities.  Feel free to Re-Commit
 with the corrected name for Fixed.
 Also, why isn't this fix MFH'd to PHP_5_2? 
 The original fix was merged, minus the feature addition, but 5.2 went RC
 yesterday, so I didn't think it wise to randomly commit.

 Any other questions?
 
 Yes, did your gerbil die or what's with the attitude?

:) perhaps it's the barrage of nit-picking messages from 3 different
people over insignificant details (and then the yeah replies) when the
fix itself was a bit of work in the first place?  It's all right though,
I know that none of us can help being smug when others mess up, I do the
same thing in my own special way.

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php