]> granicus.if.org Git - php/commitdiff
Also fix overflow in wordwrap
authorStanislav Malyshev <stas@php.net>
Tue, 6 Sep 2016 01:10:51 +0000 (18:10 -0700)
committerStanislav Malyshev <stas@php.net>
Tue, 13 Sep 2016 04:04:23 +0000 (21:04 -0700)
ext/standard/string.c

index da473d985ce1739813cb21a1ddbed07441543db7..9acbe03792666d8b02a42fa3edb0c4b3bcb32a86 100644 (file)
@@ -1011,7 +1011,7 @@ PHP_FUNCTION(wordwrap)
                /* free unused memory */
                newtext = erealloc(newtext, newtextlen+1);
 
-               RETURN_STRINGL(newtext, newtextlen, 0);
+               RETVAL_STRINGL_CHECK(newtext, newtextlen, 0);
        }
 }
 /* }}} */