Skip to content

Instantly share code, notes, and snippets.

/73082.diff Secret

Created September 25, 2016 23:08
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/5677c59cc852e4935cad3571a0daf761 to your computer and use it in GitHub Desktop.
Save anonymous/5677c59cc852e4935cad3571a0daf761 to your computer and use it in GitHub Desktop.
Patch for 73082
commit e1709b7e588cbda71c577f6e5b701713d0c70a23
Author: Stanislav Malyshev <stas@php.net>
Date: Sun Sep 25 16:07:14 2016 -0700
Fix bug #73082
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c
index 56f7cfa..cf5f8ed 100644
--- a/ext/mbstring/mbstring.c
+++ b/ext/mbstring/mbstring.c
@@ -3380,7 +3380,7 @@ PHP_FUNCTION(mb_encode_mimeheader)
mbfl_string_init(&result);
ret = mbfl_mime_header_encode(&string, &result, charset, transenc, linefeed, indent);
if (ret != NULL) {
- RETVAL_STRINGL((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */
+ RETVAL_STRINGL_CHECK((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */
} else {
RETVAL_FALSE;
}
@@ -3507,7 +3507,7 @@ PHP_FUNCTION(mb_convert_kana)
ret = mbfl_ja_jp_hantozen(&string, &result, opt);
if (ret != NULL) {
- RETVAL_STRINGL((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */
+ RETVAL_STRINGL_CHECK((char *)ret->val, ret->len, 0); /* the string is already strdup()'ed */
} else {
RETVAL_FALSE;
}
@@ -3841,7 +3841,7 @@ php_mb_numericentity_exec(INTERNAL_FUNCTION_PARAMETERS, int type)
ret = mbfl_html_numeric_entity(&string, &result, convmap, mapsize, type);
if (ret != NULL) {
- RETVAL_STRINGL((char *)ret->val, ret->len, 0);
+ RETVAL_STRINGL_CHECK((char *)ret->val, ret->len, 0);
} else {
RETVAL_FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment