[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] com php-src: Fixed valgrind issues: =?UTF-8?Q?ext/intl/collator/collator?= =?UTF-8?Q?=5Fco
From: Xinchen Hui <laruence () php ! net>
Date: 2014-07-31 10:15:47
Message-ID: php-mail-7a9421cf727491f01850c2c0e8805645362128830 () git ! php ! net
[Download RAW message or body]
Commit: 238a3167e601dd74772182e354298578c1c50021
Author: Xinchen Hui <laruence@php.net> Thu, 31 Jul 2014 18:15:47 +0800
Parents: 1f10013ac4032ecdd8b10b876777b406d09d3617
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=238a3167e601dd74772182e354298578c1c50021
Log:
Fixed valgrind issues
Changed paths:
M ext/intl/collator/collator_convert.c
M ext/intl/transliterator/transliterator_methods.c
Diff:
diff --git a/ext/intl/collator/collator_convert.c \
b/ext/intl/collator/collator_convert.c index 3f5dd3a..e1ec3b1 100644
--- a/ext/intl/collator/collator_convert.c
+++ b/ext/intl/collator/collator_convert.c
@@ -63,9 +63,11 @@ static void collator_convert_hash_item_from_utf8_to_utf16(
return;
/* Update current hash item with the converted value. */
- ZVAL_STRINGL( &znew_val, (char*)new_val, UBYTES(new_val_len) );
+ ZVAL_STRINGL( &znew_val, (char*)new_val, UBYTES(new_val_len + 1) );
//???
efree(new_val);
+ /* hack to fix use of initialized value */
+ Z_STRLEN(znew_val) = Z_STRLEN(znew_val) - UBYTES(1);
if( hashKey)
{
diff --git a/ext/intl/transliterator/transliterator_methods.c \
b/ext/intl/transliterator/transliterator_methods.c index 25edd00..4403de0 100644
--- a/ext/intl/transliterator/transliterator_methods.c
+++ b/ext/intl/transliterator/transliterator_methods.c
@@ -463,7 +463,7 @@ cleanup:
RETVAL_FALSE;
}
- zval_ptr_dtor( &tmp_object );
+ /* zval_ptr_dtor( &tmp_object ); */
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic