intel / compute-runtime

Intel® Graphics Compute Runtime for oneAPI Level Zero and OpenCL™ Driver
MIT License
1.1k stars 229 forks source link

Fix wrong parameter passed to getModuleFileName #655

Closed vladislav-ryabov closed 1 year ago

vladislav-ryabov commented 1 year ago

https://github.com/intel/compute-runtime/blob/662146ea17de31390394c380473784ed7f9811fd/shared/source/os_interface/windows/driver_info_windows.cpp#L26

MAX_PATH should be passed instead of sizeof(pathW) since it calls GetModuleFileNameW and

[in] nSize

The size of the lpFilename buffer, in TCHARs.

https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew

Signed-off-by: Vladislav Ryabov vladislav.ryabov@intel.com

JablonskiMateusz commented 1 year ago

Hi @vladislav-ryabov nice catch :) please add signed-off-by to your commit msg

vladislav-ryabov commented 1 year ago

@JablonskiMateusz done.

JablonskiMateusz commented 1 year ago

Change merged https://github.com/intel/compute-runtime/commit/6d41a6bc4027e51fb925c4000164075bdea1080a