Nov. 13, 2025
11:07 a.m.
Sven Baars (@sbaars) commented about dlls/shell32/shlview_cmenu.c:
+ + if (!SUCCEEDED(IShellLinkW_QueryInterface(shelllink, &IID_IPersistFile, (LPVOID*)&persistfile))) + { + ERR("couldn't get IPersistFile interface\n"); + IShellLinkW_Release(shelllink); + return; + } + + do { + WCHAR *link_filename; + + if (counter == 1) + { + static const WCHAR *fmt = L"%s - %s.lnk"; + int length = wcslen(filename) + wcslen(shortcutW) + 7; /* length of the format*/ + link_filename = malloc((length + 1) * sizeof(WCHAR)); Should you check if malloc returns null?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5373#note_121810