]> granicus.if.org Git - php/commitdiff
- #36185 str_rot13(NULL) crash
authorPierre Joye <pajoye@php.net>
Sat, 28 Jan 2006 00:13:13 +0000 (00:13 +0000)
committerPierre Joye <pajoye@php.net>
Sat, 28 Jan 2006 00:13:13 +0000 (00:13 +0000)
ext/standard/string.c

index 7194f804c105c3a42a3186563070a3b4265496fb..94bbc603b5ba8a76ef015fdf2c6bb36ef2f7aebf 100644 (file)
@@ -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);