Skip to content

Commit 65bf9cf

Browse files
committed
Issue python#18203: Fix decode_ascii_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar()
1 parent 6ce0dbf commit 65bf9cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Python/fileutils.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ decode_ascii_surrogateescape(const char *arg, size_t *size)
201201
unsigned char *in;
202202
wchar_t *out;
203203

204-
res = PyMem_Malloc((strlen(arg)+1)*sizeof(wchar_t));
204+
res = PyMem_RawMalloc((strlen(arg)+1)*sizeof(wchar_t));
205205
if (!res)
206206
return NULL;
207207

0 commit comments

Comments
 (0)