From: Pierre Joye Date: Sat, 28 Jan 2006 00:14:01 +0000 (+0000) Subject: - MFH: #36185 str_rot13(NULL) crash X-Git-Tag: php-5.1.3RC1~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2bfe34e06d9c2412658e8490a935fdfb1efaa83c;p=php - MFH: #36185 str_rot13(NULL) crash --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 523dfad881..177835a7d7 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -4653,6 +4653,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);