cvs: ZendEngine2 / zend_API.h

From: Date: Wed, 11 Jul 2007 15:17:41 +0000
Subject: cvs: ZendEngine2 / zend_API.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5893@lists.php.net to get a copy of this message
dmitry Wed Jul 11 15:17:41 2007 UTC Modified files: /ZendEngine2 zend_API.h Log: Fixed ascii->unicode conversion (terminating unicode character must be 0) http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.h?r1=1.288&r2=1.289&diff_format=u Index: ZendEngine2/zend_API.h diff -u ZendEngine2/zend_API.h:1.288 ZendEngine2/zend_API.h:1.289 --- ZendEngine2/zend_API.h:1.288 Tue Jun 5 11:25:02 2007 +++ ZendEngine2/zend_API.h Wed Jul 11 15:17:41 2007 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.h,v 1.288 2007/06/05 11:25:02 tony2001 Exp $ */ +/* $Id: zend_API.h,v 1.289 2007/07/11 15:17:41 dmitry Exp $ */ #ifndef ZEND_API_H #define ZEND_API_H @@ -420,6 +420,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -563,6 +564,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -707,6 +709,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -851,6 +854,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -1005,6 +1009,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -1123,6 +1128,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -1267,6 +1273,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -1390,6 +1397,7 @@ if (UG(unicode)) { \ int ___u_len = length; \ UChar *___u_str = zend_ascii_to_unicode((str), (___u_len)+1 ZEND_FILE_LINE_CC); \ + ___u_str[___u_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(str); \ } \ @@ -1644,6 +1652,7 @@ char *__s = (s); \ int __s_len = strlen(__s); \ UChar *u_str = zend_ascii_to_unicode(__s, __s_len+1 ZEND_FILE_LINE_CC); \ + u_str[__s_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(__s); \ } \ @@ -1661,6 +1670,7 @@ char *__s = (s); \ int __s_len = (l); \ UChar *u_str = zend_ascii_to_unicode((__s), (__s_len)+1 ZEND_FILE_LINE_CC); \ + u_str[__s_len] = 0; \ if ((flags) & ZSTR_AUTOFREE) { \ efree(__s); \ } \

« previous php.zend-engine.cvs (#5893) next »