]> granicus.if.org Git - php/commitdiff
Fix posix_setrlimit segfault
authorNikita Popov <nikic@php.net>
Thu, 9 Jul 2015 18:40:07 +0000 (20:40 +0200)
committerNikita Popov <nikic@php.net>
Thu, 9 Jul 2015 18:40:07 +0000 (20:40 +0200)
ext/posix/posix.c

index 6d34da7609fad451c7afc8c1f1258072f53b6dc9..547e93e58ead98dbbb1d44dbaf86513eb08ace3f 100644 (file)
@@ -1389,8 +1389,7 @@ PHP_FUNCTION(posix_getrlimit)
 PHP_FUNCTION(posix_setrlimit)
 {
        struct rlimit rl;
-       zend_long cur, max;
-       int res;
+       zend_long res, cur, max;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &res, &cur, &max) == FAILURE) {
                RETURN_FALSE;