Bug #55296 [Opn->Csd]: wrong use efree(NULL) in intl
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: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: multiple
PHP Version: 5.3.7RC3
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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
Thread (4 messages)