#51002 [NEW]: An int variable is used as size_t in child function
| From: | sixd@php.net | Date: | Wed, 10 Feb 2010 20:07:06 +0000 |
| Subject: | #51002 [NEW]: An int variable is used as size_t in child function | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-147410@lists.php.net to get a copy of this message | ||
From: sixd@php.net
Operating system: n/a
PHP version: 5.3.2RC1
PHP Bug Type: Zip Related
Bug description: An int variable is used as size_t in child function
Description:
------------
In php_zip_add_from_pattern() a pointer to file_stripped_len is passed
to php_based which treats the address as a size_t. If the size of int
differs from the size of size_t then this could cause a memory access
error.
int entry_name_len,file_stripped_len;
...
php_basename(Z_STRVAL_PP(zval_file), Z_STRLEN_PP(zval_file), NULL, 0,
&basename, (size_t *)&file_stripped_len TSRMLS_CC)
This is related to Rasmus's fix
http://svn.php.net/viewvc?view=revision&revision=294816
--
Edit bug report at http://bugs.php.net/?id=51002&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=51002&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=51002&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=51002&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=51002&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=51002&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=51002&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=51002&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=51002&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=51002&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=51002&r=support
Expected behavior: http://bugs.php.net/fix.php?id=51002&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=51002&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=51002&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=51002&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=51002&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=51002&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=51002&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=51002&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=51002&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=51002&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=51002&r=mysqlcfg