From: Dmitry Stogov Date: Wed, 31 Jan 2018 09:38:02 +0000 (+0300) Subject: Fixed string comparison (it may fail in case of not null-terminated strings) X-Git-Tag: php-7.3.0alpha1~520 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e43ac263561d8d748cb571905a5dabc2d6d5560e;p=php Fixed string comparison (it may fail in case of not null-terminated strings) --- diff --git a/Zend/zend_string.c b/Zend/zend_string.c index 873fb6e496..23d6d245fe 100644 --- a/Zend/zend_string.c +++ b/Zend/zend_string.c @@ -346,7 +346,7 @@ ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_str "jmp .LL3%=\n\t" ".LL2%=:\n\t" "negl %1\n\t" - "lea 0x1c(,%1,8), %1\n\t" + "lea 0x20(,%1,8), %1\n\t" "shll %b1, %0\n\t" "sete %b0\n\t" "movzbl %b0, %0\n\t" @@ -414,7 +414,7 @@ ZEND_API zend_bool ZEND_FASTCALL zend_string_equal_val(zend_string *s1, zend_str "jmp .LL3%=\n\t" ".LL2%=:\n\t" "negq %1\n\t" - "lea 0x3c(,%1,8), %1\n\t" + "lea 0x40(,%1,8), %1\n\t" "shlq %b1, %0\n\t" "sete %b0\n\t" "movzbq %b0, %0\n\t"