Skip to content

Instantly share code, notes, and snippets.

/73017.diff Secret

Created Sep 6, 2016
Embed
What would you like to do?
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