diff options
Diffstat (limited to 'Modules/_winapi.c')
| -rw-r--r-- | Modules/_winapi.c | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_winapi.c b/Modules/_winapi.c index 647075cdb1..5dc50fbe4d 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -603,11 +603,10 @@ _winapi_CreateJunction_impl(PyObject *module, LPWSTR src_path,          sizeof(rdb->MountPointReparseBuffer.PathBuffer) +          /* Two +1's for NUL terminators. */          (prefix_len + print_len + 1 + print_len + 1) * sizeof(WCHAR); -    rdb = (_Py_PREPARSE_DATA_BUFFER)PyMem_RawMalloc(rdb_size); +    rdb = (_Py_PREPARSE_DATA_BUFFER)PyMem_RawCalloc(1, rdb_size);      if (rdb == NULL)          goto cleanup; -    memset(rdb, 0, rdb_size);      rdb->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT;      rdb->ReparseDataLength = rdb_size - _Py_REPARSE_DATA_BUFFER_HEADER_SIZE;      rdb->MountPointReparseBuffer.SubstituteNameOffset = 0;  | 
