Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix bug #72135 - don't create strings with lengths outside int range
  • Loading branch information
smalyshev committed May 16, 2016
1 parent 41fc3c7 commit 0da8b8b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/standard/html.c
Expand Up @@ -1444,6 +1444,10 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
}

replaced = php_escape_html_entities_ex(str, str_len, &new_len, all, (int) flags, hint_charset, double_encode TSRMLS_CC);
if (new_len > INT_MAX) {
efree(replaced);
RETURN_FALSE;
}
RETVAL_STRINGL(replaced, (int)new_len, 0);
}
/* }}} */
Expand Down

0 comments on commit 0da8b8b

Please sign in to comment.