Issue #18203: Fix decode_ascii_surrogateescape(), use PyMem_RawMalloc() as _Py_char2wchar()
This commit is contained in:
parent
6ce0dbf460
commit
65bf9cf26f
|
@ -201,7 +201,7 @@ decode_ascii_surrogateescape(const char *arg, size_t *size)
|
|||
unsigned char *in;
|
||||
wchar_t *out;
|
||||
|
||||
res = PyMem_Malloc((strlen(arg)+1)*sizeof(wchar_t));
|
||||
res = PyMem_RawMalloc((strlen(arg)+1)*sizeof(wchar_t));
|
||||
if (!res)
|
||||
return NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue