mirror of
https://github.com/php/php-src.git
synced 2026-03-27 17:52:16 +01:00
fix #40915 (addcslashes unexpected behavior with binary input)
This commit is contained in:
@@ -4555,8 +4555,8 @@ PHP_FUNCTION(addcslashes)
|
||||
RETURN_STRINGL(str, str_len, 1);
|
||||
}
|
||||
|
||||
RETURN_STRING(php_addcslashes(str, str_len, &Z_STRLEN_P(return_value), 0,
|
||||
what, what_len TSRMLS_CC), 0);
|
||||
Z_STRVAL_P(return_value) = php_addcslashes(str, str_len, &Z_STRLEN_P(return_value), 0, what, what_len TSRMLS_CC);
|
||||
RETURN_STRINGL(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value), 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
BIN
ext/standard/tests/strings/bug40915.phpt
Normal file
BIN
ext/standard/tests/strings/bug40915.phpt
Normal file
Binary file not shown.
Reference in New Issue
Block a user