Skip to content

Instantly share code, notes, and snippets.

/73017.diff Secret

Created September 6, 2016 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/fae8c27b6252cef6bfc33f7fddd03b6b to your computer and use it in GitHub Desktop.
Save anonymous/fae8c27b6252cef6bfc33f7fddd03b6b to your computer and use it in GitHub Desktop.
Patch for 73017
commit fd42d3cab21295196e0b7c9df3ce85567c7bdad3
Author: Stanislav Malyshev <stas@php.net>
Date: Mon Sep 5 18:10:51 2016 -0700
Also fix overflow in wordwrap
diff --git a/ext/standard/string.c b/ext/standard/string.c
index da473d9..9acbe03 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -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);
}
}
/* }}} */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment