fs-event: fix invalid memory access
file_info->FileName is not null terminated.
This commit is contained in:
parent
47d98b64c4
commit
da32344730
@ -339,7 +339,8 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
|
||||
uv_fatal_error(ERROR_OUTOFMEMORY, "malloc");
|
||||
}
|
||||
|
||||
_snwprintf(filenamew, size, L"%s\\%s", handle->dirw,
|
||||
_snwprintf(filenamew, size, L"%s\\%.*s", handle->dirw,
|
||||
file_info->FileNameLength / sizeof(WCHAR),
|
||||
file_info->FileName);
|
||||
|
||||
filenamew[size - 1] = L'\0';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user