From: Pierre Joye Date: Sat, 28 Jan 2006 00:13:13 +0000 (+0000) Subject: - #36185 str_rot13(NULL) crash X-Git-Tag: RELEASE_1_2~352 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d10b1290b28144ea6b5a25824bec930a8a8a95b4;p=php - #36185 str_rot13(NULL) crash --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 7194f804c1..94bbc603b5 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -6324,6 +6324,8 @@ PHP_FUNCTION(str_rot13) if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg)) { WRONG_PARAM_COUNT; } + + convert_to_string_ex(arg); RETVAL_ZVAL(*arg, 1, 0); php_strtr(Z_STRVAL_P(return_value), Z_STRLEN_P(return_value), rot13_from, rot13_to, 52);