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

index 523dfad881284576cdb3fa9b6ec33a313a96f320..177835a7d707c6bf12cbc9f9d49959047858e7fe 100644 (file)
@@ -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);