com php-src: fix macros: ext/hash/hash.c
| From: | Anatol Belski | Date: | Wed, 19 Mar 2014 08:45:22 +0000 |
| Subject: | com php-src: fix macros: ext/hash/hash.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76532@lists.php.net to get a copy of this message | ||
Commit: fa6ba0ecdb3260b76e4a19aa34c82e7ba350c176
Author: Anatol Belski <ab@php.net> Wed, 19 Mar 2014 09:45:22 +0100
Parents: 87da8f58e2e6ff1ef2ac1ab68185c263ef023987
Branches: str_size_and_int64_56_backport
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fa6ba0ecdb3260b76e4a19aa34c82e7ba350c176
Log:
fix macros
Changed paths:
M ext/hash/hash.c
Diff:
diff --git a/ext/hash/hash.c b/ext/hash/hash.c
index e7b17cc..d33a816 100644
--- a/ext/hash/hash.c
+++ b/ext/hash/hash.c
@@ -754,7 +754,7 @@ PHP_FUNCTION(hash_equals)
RETURN_FALSE;
}
- if (Z_STRLEN_P(known_zval) != Z_STRLEN_P(user_zval)) {
+ if (Z_STRSIZE_P(known_zval) != Z_STRSIZE_P(user_zval)) {
RETURN_FALSE;
}
@@ -762,7 +762,7 @@ PHP_FUNCTION(hash_equals)
user_str = Z_STRVAL_P(user_zval);
/* This is security sensitive code. Do not optimize this for speed. */
- for (j = 0; j < Z_STRLEN_P(known_zval); j++) {
+ for (j = 0; j < Z_STRSIZE_P(known_zval); j++) {
result |= known_str[j] ^ user_str[j];
}