[PHP-CVS] cvs: php-src /ext/fdf fdf.c

2007-01-02 Thread Ilia Alshanetsky
iliaa   Wed Jan  3 04:05:36 2007 UTC

  Modified files:  
/php-src/ext/fdffdf.c 
  Log:
  Use proper length
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/fdf/fdf.c?r1=1.101&r2=1.102&diff_format=u
Index: php-src/ext/fdf/fdf.c
diff -u php-src/ext/fdf/fdf.c:1.101 php-src/ext/fdf/fdf.c:1.102
--- php-src/ext/fdf/fdf.c:1.101 Wed Jan  3 03:55:29 2007
+++ php-src/ext/fdf/fdf.c   Wed Jan  3 04:05:36 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fdf.c,v 1.101 2007/01/03 03:55:29 iliaa Exp $ */
+/* $Id: fdf.c,v 1.102 2007/01/03 04:05:36 iliaa Exp $ */
 
 /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -1448,7 +1448,7 @@
if(lastfieldname) efree(lastfieldname);
lastfieldname = estrdup(name);
 
-   if 
(sapi_module.input_filter(PARSE_POST, name, &value, value_len - 1, &new_val_len 
TSRMLS_CC)) {
+   if 
(sapi_module.input_filter(PARSE_POST, name, &value, nBytes, &new_val_len 
TSRMLS_CC)) {

php_register_variable_safe(name, value, new_val_len, array_ptr TSRMLS_CC);
}
} 

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/fdf fdf.c

2007-01-02 Thread Ilia Alshanetsky
iliaa   Wed Jan  3 04:05:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/fdffdf.c 
  Log:
  Use proper length
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/fdf/fdf.c?r1=1.89.2.2.2.7&r2=1.89.2.2.2.8&diff_format=u
Index: php-src/ext/fdf/fdf.c
diff -u php-src/ext/fdf/fdf.c:1.89.2.2.2.7 php-src/ext/fdf/fdf.c:1.89.2.2.2.8
--- php-src/ext/fdf/fdf.c:1.89.2.2.2.7  Wed Jan  3 03:55:07 2007
+++ php-src/ext/fdf/fdf.c   Wed Jan  3 04:05:12 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fdf.c,v 1.89.2.2.2.7 2007/01/03 03:55:07 iliaa Exp $ */
+/* $Id: fdf.c,v 1.89.2.2.2.8 2007/01/03 04:05:12 iliaa Exp $ */
 
 /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -1448,7 +1448,7 @@
if(lastfieldname) efree(lastfieldname);
lastfieldname = estrdup(name);
 
-   if 
(sapi_module.input_filter(PARSE_POST, name, &value, value_len - 1, &new_val_len 
TSRMLS_CC)) {
+   if 
(sapi_module.input_filter(PARSE_POST, name, &value, nBytes, &new_val_len 
TSRMLS_CC)) {

php_register_variable_safe(name, value, new_val_len, array_ptr TSRMLS_CC);
}
} 

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/fdf fdf.c

2007-01-02 Thread Ilia Alshanetsky
iliaa   Wed Jan  3 03:59:23 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/fdffdf.c 
  Log:
  MFH: unlink temporary file on error
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/fdf/fdf.c?r1=1.66.2.13.2.3&r2=1.66.2.13.2.4&diff_format=u
Index: php-src/ext/fdf/fdf.c
diff -u php-src/ext/fdf/fdf.c:1.66.2.13.2.3 php-src/ext/fdf/fdf.c:1.66.2.13.2.4
--- php-src/ext/fdf/fdf.c:1.66.2.13.2.3 Mon Jan  1 09:46:41 2007
+++ php-src/ext/fdf/fdf.c   Wed Jan  3 03:59:23 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fdf.c,v 1.66.2.13.2.3 2007/01/01 09:46:41 sebastian Exp $ */
+/* $Id: fdf.c,v 1.66.2.13.2.4 2007/01/03 03:59:23 iliaa Exp $ */
 
 /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -1210,20 +1210,19 @@
if(err == FDFErcOK && nBytes != 0) {
for(p=value;*p;p++) if(*p=='\r') 
*p='\n';
if(lastfieldname) efree(lastfieldname);
-   lastfieldname = estrdup(name);  
+   lastfieldname = estrdup(name);
php_register_variable(name, value, 
array_ptr TSRMLS_CC);
} 
}
}   
-   
FDFClose(theFDF);
-   VCWD_UNLINK((const char *)filename);
-   efree(filename);
 
if(name)  efree(name);
if(value) efree(value);
if(lastfieldname) efree(lastfieldname);
} 
+   VCWD_UNLINK((const char *)filename);
+   efree(filename);
 }
 /* }}} */
 

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



[PHP-CVS] cvs: php-src /ext/fdf fdf.c

2007-01-02 Thread Ilia Alshanetsky
iliaa   Wed Jan  3 03:55:29 2007 UTC

  Modified files:  
/php-src/ext/fdffdf.c 
  Log:
  MFB:
Added filter callback
Unlink temporary file on error

  
http://cvs.php.net/viewvc.cgi/php-src/ext/fdf/fdf.c?r1=1.100&r2=1.101&diff_format=u
Index: php-src/ext/fdf/fdf.c
diff -u php-src/ext/fdf/fdf.c:1.100 php-src/ext/fdf/fdf.c:1.101
--- php-src/ext/fdf/fdf.c:1.100 Mon Jan  1 09:29:23 2007
+++ php-src/ext/fdf/fdf.c   Wed Jan  3 03:55:29 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fdf.c,v 1.100 2007/01/01 09:29:23 sebastian Exp $ */
+/* $Id: fdf.c,v 1.101 2007/01/03 03:55:29 iliaa Exp $ */
 
 /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -1442,22 +1442,26 @@
if(nBytes>0) {
err = FDFGetValue(theFDF, name, value, 
value_len-1, &nBytes);
if(err == FDFErcOK && nBytes != 0) {
+   unsigned int new_val_len;
+
for(p=value;*p;p++) if(*p=='\r') 
*p='\n';
if(lastfieldname) efree(lastfieldname);
-   lastfieldname = estrdup(name);  
-   php_register_variable(name, value, 
array_ptr TSRMLS_CC);
+   lastfieldname = estrdup(name);
+
+   if 
(sapi_module.input_filter(PARSE_POST, name, &value, value_len - 1, &new_val_len 
TSRMLS_CC)) {
+   
php_register_variable_safe(name, value, new_val_len, array_ptr TSRMLS_CC);
+   }
} 
}
}   
-   
FDFClose(theFDF);
-   VCWD_UNLINK((const char *)filename);
-   efree(filename);
 
if(name)  efree(name);
if(value) efree(value);
if(lastfieldname) efree(lastfieldname);
} 
+   VCWD_UNLINK((const char *)filename);
+   efree(filename);
 }
 /* }}} */
 

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/fdf fdf.c

2007-01-02 Thread Ilia Alshanetsky
iliaa   Wed Jan  3 03:55:07 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/fdffdf.c 
  Log:
  Added filter callback
  Unlink temporary file on error
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/fdf/fdf.c?r1=1.89.2.2.2.6&r2=1.89.2.2.2.7&diff_format=u
Index: php-src/ext/fdf/fdf.c
diff -u php-src/ext/fdf/fdf.c:1.89.2.2.2.6 php-src/ext/fdf/fdf.c:1.89.2.2.2.7
--- php-src/ext/fdf/fdf.c:1.89.2.2.2.6  Mon Jan  1 09:36:00 2007
+++ php-src/ext/fdf/fdf.c   Wed Jan  3 03:55:07 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: fdf.c,v 1.89.2.2.2.6 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: fdf.c,v 1.89.2.2.2.7 2007/01/03 03:55:07 iliaa Exp $ */
 
 /* FdfTk lib 2.0 is a Complete C/C++ FDF Toolkit available from
http://beta1.adobe.com/ada/acrosdk/forms.html. */
@@ -1442,22 +1442,26 @@
if(nBytes>0) {
err = FDFGetValue(theFDF, name, value, 
value_len-1, &nBytes);
if(err == FDFErcOK && nBytes != 0) {
+   unsigned int new_val_len;
+
for(p=value;*p;p++) if(*p=='\r') 
*p='\n';
if(lastfieldname) efree(lastfieldname);
-   lastfieldname = estrdup(name);  
-   php_register_variable(name, value, 
array_ptr TSRMLS_CC);
+   lastfieldname = estrdup(name);
+
+   if 
(sapi_module.input_filter(PARSE_POST, name, &value, value_len - 1, &new_val_len 
TSRMLS_CC)) {
+   
php_register_variable_safe(name, value, new_val_len, array_ptr TSRMLS_CC);
+   }
} 
}
}   
-   
FDFClose(theFDF);
-   VCWD_UNLINK((const char *)filename);
-   efree(filename);
 
if(name)  efree(name);
if(value) efree(value);
if(lastfieldname) efree(lastfieldname);
} 
+   VCWD_UNLINK((const char *)filename);
+   efree(filename);
 }
 /* }}} */
 

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



[PHP-CVS] cvs: php-src /ext/spl spl_array.c

2007-01-02 Thread Marcus Boerger
helly   Tue Jan  2 18:15:22 2007 UTC

  Modified files:  
/php-src/ext/splspl_array.c 
  Log:
  - Make Andrei happy - spread some U's
  http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.115&r2=1.116&diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.115 php-src/ext/spl/spl_array.c:1.116
--- php-src/ext/spl/spl_array.c:1.115   Mon Jan  1 09:29:29 2007
+++ php-src/ext/spl/spl_array.c Tue Jan  2 18:15:22 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.115 2007/01/01 09:29:29 sebastian Exp $ */
+/* $Id: spl_array.c,v 1.116 2007/01/02 18:15:22 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -503,8 +503,8 @@
return spl_array_has_dimension_ex(1, object, offset, check_empty 
TSRMLS_CC);
 } /* }}} */
 
-/* {{{ proto bool ArrayObject::offsetExists(mixed $index)
-   proto bool ArrayIterator::offsetExists(mixed $index)
+/* {{{ proto bool ArrayObject::offsetExists(mixed $index) U
+   proto bool ArrayIterator::offsetExists(mixed $index) U
  Returns whether the requested $index exists. */
 SPL_METHOD(Array, offsetExists)
 {
@@ -515,8 +515,8 @@
RETURN_BOOL(spl_array_has_dimension_ex(0, getThis(), index, 1 
TSRMLS_CC));
 } /* }}} */
 
-/* {{{ proto mixed ArrayObject::offsetGet(mixed $index)
-   proto mixed ArrayIterator::offsetGet(mixed $index)
+/* {{{ proto mixed ArrayObject::offsetGet(mixed $index) U
+   proto mixed ArrayIterator::offsetGet(mixed $index) U
  Returns the value at the specified $index. */
 SPL_METHOD(Array, offsetGet)
 {
@@ -528,8 +528,8 @@
RETURN_ZVAL(value, 1, 0);
 } /* }}} */
 
-/* {{{ proto void ArrayObject::offsetSet(mixed $index, mixed $newval)
-   proto void ArrayIterator::offsetSet(mixed $index, mixed $newval)
+/* {{{ proto void ArrayObject::offsetSet(mixed $index, mixed $newval) U
+   proto void ArrayIterator::offsetSet(mixed $index, mixed $newval) U
  Sets the value at the specified $index to $newval. */
 SPL_METHOD(Array, offsetSet)
 {
@@ -562,8 +562,8 @@
}
 } /* }}} */
 
-/* {{{ proto void ArrayObject::append(mixed $newval)
-   proto void ArrayIterator::append(mixed $newval)
+/* {{{ proto void ArrayObject::append(mixed $newval) U
+   proto void ArrayIterator::append(mixed $newval) U
  Appends the value (cannot be called for objects). */
 SPL_METHOD(Array, append)
 {
@@ -575,8 +575,8 @@
spl_array_iterator_append(getThis(), value TSRMLS_CC);
 } /* }}} */
 
-/* {{{ proto void ArrayObject::offsetUnset(mixed $index)
-   proto void ArrayIterator::offsetUnset(mixed $index)
+/* {{{ proto void ArrayObject::offsetUnset(mixed $index) U
+   proto void ArrayIterator::offsetUnset(mixed $index) U
  Unsets the value at the specified $index. */
 SPL_METHOD(Array, offsetUnset)
 {
@@ -587,8 +587,8 @@
spl_array_unset_dimension_ex(0, getThis(), index TSRMLS_CC);
 } /* }}} */
 
-/* {{ proto array ArrayObject::getArrayCopy()
-  proto array ArrayIterator::getArrayCopy()
+/* {{ proto array ArrayObject::getArrayCopy() U
+  proto array ArrayIterator::getArrayCopy() U
  Return a copy of the contained array */
 SPL_METHOD(Array, getArrayCopy)
 {
@@ -878,8 +878,8 @@
 }
 /* }}} */
 
-/* {{{ proto void ArrayObject::__construct(array|object ar = array() [, int 
flags = 0 [, string iterator_class = "ArrayIterator"]])
-   proto void ArrayIterator::__construct(array|object ar = array() [, int 
flags = 0])
+/* {{{ proto void ArrayObject::__construct(array|object ar = array() [, int 
flags = 0 [, string iterator_class = "ArrayIterator"]]) U
+   proto void ArrayIterator::__construct(array|object ar = array() [, int 
flags = 0]) U
  Cronstructs a new array iterator from a path. */
 SPL_METHOD(Array, __construct)
 {
@@ -887,9 +887,7 @@
spl_array_object *intern;
zval *array;
long ar_flags = 0;
-   char *class_name;
-   int class_name_len;
-   zend_class_entry ** pce_get_iterator;
+   zend_class_entry *ce_get_iterator = zend_ce_iterator;
 
if (ZEND_NUM_ARGS() == 0) {
return; /* nothing to do */
@@ -898,18 +896,13 @@
 
intern = (spl_array_object*)zend_object_store_get_object(object 
TSRMLS_CC);
 
-   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ls", &array, 
&ar_flags, &class_name, &class_name_len) == FAILURE) {
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|lC", &array, 
&ar_flags, &ce_get_iterator) == FAILURE) {
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
return;
}
 
if (ZEND_NUM_ARGS() > 2) {
-   if (zend_lookup_class(class_name, class_name_len, 
&pce_get_iterator TSRMLS_CC) == FAILURE) {
-   zend_throw_exception(spl_ce_InvalidArgumentException, 
"A class that implements Iterator must be specified", 0 TSRMLS_CC);
-   php_set_error_handling(EH_NORMAL, N

[PHP-CVS] cvs: php-src /ext/standard proc_open.c

2007-01-02 Thread Nuno Lopes
nlopess Tue Jan  2 15:31:58 2007 UTC

  Modified files:  
/php-src/ext/standard   proc_open.c 
  Log:
  MFB
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.48&r2=1.49&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.48 
php-src/ext/standard/proc_open.c:1.49
--- php-src/ext/standard/proc_open.c:1.48   Mon Jan  1 09:29:32 2007
+++ php-src/ext/standard/proc_open.cTue Jan  2 15:31:58 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: proc_open.c,v 1.48 2007/01/01 09:29:32 sebastian Exp $ */
+/* $Id: proc_open.c,v 1.49 2007/01/02 15:31:58 nlopess Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE   /* linux wants this when XOPEN mode is on */
@@ -602,8 +602,6 @@
}
 #endif
 
-   
-
} else if (strcmp(Z_STRVAL_PP(ztype), "file") == 0) {
zval **zfile, **zmode;
char *filename;
@@ -781,7 +779,8 @@
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
close(descriptors[i].childend);
-   close(descriptors[i].parentend);
+   if (descriptors[i].parentend)
+   close(descriptors[i].parentend);
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "procve failed - 
%s", strerror(errno));
goto exit_fail;
@@ -850,7 +849,8 @@
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
close(descriptors[i].childend);
-   close(descriptors[i].parentend);
+   if (descriptors[i].parentend)
+   close(descriptors[i].parentend);
}
 
php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork failed - %s", 
strerror(errno));

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard proc_open.c

2007-01-02 Thread Nuno Lopes
nlopess Tue Jan  2 15:29:09 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   proc_open.c 
/php-srcNEWS 
  Log:
  +- Fixed bug #37619 (proc_open() closes stdin on fork() failure).
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.36.2.1.2.5&r2=1.36.2.1.2.6&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.5 
php-src/ext/standard/proc_open.c:1.36.2.1.2.6
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.5   Mon Jan  1 09:36:08 2007
+++ php-src/ext/standard/proc_open.cTue Jan  2 15:29:09 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: proc_open.c,v 1.36.2.1.2.5 2007/01/01 09:36:08 sebastian Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.6 2007/01/02 15:29:09 nlopess Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE   /* linux wants this when XOPEN mode is on */
@@ -625,8 +625,6 @@
descriptors[ndesc].mode_flags |= 
O_BINARY;
 #endif
 
-   
-
} else if (strcmp(Z_STRVAL_PP(ztype), "file") == 0) {
zval **zfile, **zmode;
int fd;
@@ -788,7 +786,8 @@
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
close(descriptors[i].childend);
-   close(descriptors[i].parentend);
+   if (descriptors[i].parentend)
+   close(descriptors[i].parentend);
}
php_error_docref(NULL TSRMLS_CC, E_WARNING, "procve failed - 
%s", strerror(errno));
goto exit_fail;
@@ -855,7 +854,8 @@
/* clean up all the descriptors */
for (i = 0; i < ndesc; i++) {
close(descriptors[i].childend);
-   close(descriptors[i].parentend);
+   if (descriptors[i].parentend)
+   close(descriptors[i].parentend);
}
 
php_error_docref(NULL TSRMLS_CC, E_WARNING, "fork failed - %s", 
strerror(errno));
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.468&r2=1.2027.2.547.2.469&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.468 php-src/NEWS:1.2027.2.547.2.469
--- php-src/NEWS:1.2027.2.547.2.468 Sun Dec 31 19:22:01 2006
+++ php-src/NEWSTue Jan  2 15:29:09 2007
@@ -51,6 +51,8 @@
 - Fixed bugs #39361 & #39400 (mbstring function overloading problem). (Seiji)
 - Fixed bug #38852 (XML-RPC Breaks iconv). (Hannes)
 - Fixed bug #38542 (proc_get_status() returns wrong PID on windows). (Nuno)
+- Fixed bug #37619 (proc_open() closes stdin on fork() failure).
+  (jdolecek at NetBSD dot org, Nuno)
 - Fixed bug #37588 (COM Property propputref converts to PHP function
   and can't be accesed). (Rob)
 - Fixed bug #36427 (proc_open() / proc_close() leak handles on windows).

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



[PHP-CVS] cvs: CVSROOT / avail

2007-01-02 Thread Pierre-Alain Joye
pajoye  Tue Jan  2 15:24:53 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - jonas gd karma
  
  
http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1231&r2=1.1232&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1231 CVSROOT/avail:1.1232
--- CVSROOT/avail:1.1231Tue Jan  2 14:12:20 2007
+++ CVSROOT/avail   Tue Jan  2 15:24:53 2007
@@ -396,6 +396,6 @@
 # Please ask [EMAIL PROTECTED] before adding some unknown guys :)
 # gd/libgd is the library itself, other directories are for 
 # the various tools (website, bugs,...)
-avail|pajoye,edink,lhecking|gd
+avail|pajoye,edink,lhecking,jonas|gd
 
 # vim:set ft=conf sw=2 ts=2 et:

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/zip zip.c

2007-01-02 Thread Ilia Alshanetsky
iliaa   Tue Jan  2 14:40:32 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/zipzip.c 
  Log:
  
  Added length parameter validator to zip_entry_read()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/zip/zip.c?r1=1.33.2.3.2.2&r2=1.33.2.3.2.3&diff_format=u
Index: php-src/ext/zip/zip.c
diff -u php-src/ext/zip/zip.c:1.33.2.3.2.2 php-src/ext/zip/zip.c:1.33.2.3.2.3
--- php-src/ext/zip/zip.c:1.33.2.3.2.2  Mon Jan  1 09:46:50 2007
+++ php-src/ext/zip/zip.c   Tue Jan  2 14:40:32 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: zip.c,v 1.33.2.3.2.2 2007/01/01 09:46:50 sebastian Exp $ */
+/* $Id: zip.c,v 1.33.2.3.2.3 2007/01/02 14:40:32 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -283,7 +283,7 @@
 }
 /* }}} */
 
-/* {{{ proto string zip_entry_read(resource zip_ent)
+/* {{{ proto string zip_entry_read(resource zip_ent [, int nbytes])
Read X bytes from an opened zip entry */
 PHP_FUNCTION(zip_entry_read)
 {
@@ -296,6 +296,10 @@
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zzip_ent, 
&len) == FAILURE) {
return;
}
+   if (len <= 0) {
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, "The bytes 
parameter must greater then zero");
+   RETURN_FALSE;
+   }
ZEND_FETCH_RESOURCE(entry, php_zzip_dirent *, &zzip_ent, -1, 
le_zip_entry_name, le_zip_entry);
 
buf = emalloc(len + 1);

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



[PHP-CVS] cvs: CVSROOT / avail

2007-01-02 Thread Rasmus Lerdorf
rasmus  Tue Jan  2 14:12:20 2007 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  doc karma for shadda
  
  http://cvs.php.net/viewvc.cgi/CVSROOT/avail?r1=1.1230&r2=1.1231&diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1230 CVSROOT/avail:1.1231
--- CVSROOT/avail:1.1230Sat Dec 30 20:22:18 2006
+++ CVSROOT/avail   Tue Jan  2 14:12:20 2007
@@ -40,7 +40,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief97!
 
7,shlomi,raful,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodiv!
 e,ama,andras,hassen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,ti
x,alrehawi_,liuming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhit!
 
ama,engkongs,preilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant,colder,ramsey,arkadius,bjori,erinet,omar,sixd,oliver,rquadling,timo|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it!
 ,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc
-pt,phpdoc-ro,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-zh,phpdoc-ca
+avail|jmertic,bobby,takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,s