Bug #55296 [Csd]: wrong use efree(NULL) in intl
| From: | felipe@php.net | Date: | Thu, 04 Aug 2011 10:57:11 +0000 |
| Subject: | Bug #55296 [Csd]: wrong use efree(NULL) in intl | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162403@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55296&edit=1
ID: 55296
Updated by: felipe@php.net
Reported by: max at cxib dot net
Summary: wrong use efree(NULL) in intl
Status: Closed
Type: Bug
Package: *General Issues
Operating System: multiple
PHP Version: 5.3.7RC3
Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
Fixed, thanks.
Previous Comments:
------------------------------------------------------------------------
[2011-08-04 10:12:12] neweracracker at gmail dot com
Hello,
Please review this commit. Seems incomplete.
svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/intl/grapheme/grapheme_string.c?r1=314218&r2=314217&pathrev=314218
------------------------------------------------------------------------
[2011-08-04 00:59:41] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=314218
Log: - Fixed possible efree(NULL) (bug #55296)
------------------------------------------------------------------------
[2011-08-04 00:59:36] felipe@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2011-07-27 12:51:47] max at cxib dot net
Description:
------------
intl_convert_utf8_to_utf16() is wrong used in a multiple points. Example
165 intl_convert_utf8_to_utf16(&uhaystack, &uhaystack_len, (char *)
haystack, haystack_len, &status );
166
167 if ( U_FAILURE( status ) ) {
168 /* Set global error code. */
169 intl_error_set_code( NULL, status TSRMLS_CC );
170
171 /* Set error messages. */
172 intl_error_set_custom_msg( NULL, "Error converting input
string to UTF-16", 0 TSRMLS_CC );
173 efree( uhaystack );
174 return -1;
175 }
efree() call to uhaystack => (efree(NULL)). sometime 'uhaystack' may be
NULL. It's a multiple problem in intl. Then efree() print error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55296&edit=1