31 Oct
2022
31 Oct
'22
11:01 a.m.
Jacek Caban (@jacek) commented about dlls/mshtml/main.c:
+ len = wcslen(content_type) + 32; + for(;;) { + if(!(str = heap_alloc(len * sizeof(WCHAR)))) + return E_OUTOFMEMORY; + if(GetMIMETypeSubKeyW(content_type, str, len)) + break; + heap_free(str); + len *= 2; + } + } + + status = RegOpenKeyExW(HKEY_CLASSES_ROOT, str, 0, KEY_QUERY_VALUE, &key); + if(str != buffer) + heap_free(str); + if(status != ERROR_SUCCESS) + goto no_mime_database; You could just initialize key to NULL and use regular fail code path here.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1172#note_12482