From e43ac263561d8d748cb571905a5dabc2d6d5560e Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 31 Jan 2018 12:38:02 +0300 Subject: [PATCH] Fixed string comparison (it may fail in case of not null-terminated strings) --- Zend/zend_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" -- 2.50.1