#51002 [Asn]: An int variable is used as size_t in child function

From: Date: Fri, 12 Feb 2010 17:10:15 +0000
Subject: #51002 [Asn]: An int variable is used as size_t in child function
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147488@lists.php.net to get a copy of this message
 ID:               51002
 Updated by:       jani@php.net
 Reported By:      sixd@php.net
 Status:           Assigned
 Bug Type:         Zip Related
-Operating System: n/a
+Operating System: *
 PHP Version:      5.3.2RC1
 Assigned To:      pajoye
 New Comment:

There is no such OS called 'n/a'.


Previous Comments:
------------------------------------------------------------------------

[2010-02-10 20:12:23] johannes@php.net

Assign to maintainer

------------------------------------------------------------------------

[2010-02-10 20:07:06] sixd@php.net

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 this bug report at http://bugs.php.net/?id=51002&edit=1



Thread (4 messages)

« previous php.bugs (#147488) next »