Skip to content

Commit 3851509

Browse files
use safe_emalloc
1 parent 6852001 commit 3851509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/intl/listformatter/listformatter_class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ PHP_METHOD(IntlListFormatter, format)
185185

186186
// Allocate buffer and try again
187187
status = U_ZERO_ERROR;
188-
result = (UChar *)emalloc((resultLength + 1) * sizeof(UChar));
188+
result = (UChar *)safe_emalloc(resultLength + 1, sizeof(UChar), 0);
189189
ulistfmt_format(LISTFORMATTER_OBJECT(obj), items, itemLengths, count, result, resultLength, &status);
190190

191191
if (U_FAILURE(status)) {

0 commit comments

Comments
 (0)