Nikolay Sivov (@nsivov) commented about dlls/combase/combase.c:
> if (open_classes_key(HKEY_CLASSES_ROOT, buf, MAXIMUM_ALLOWED, &xhkey))
> {
> - free(buf);
> - WARN("couldn't open key for ProgID %s\n", debugstr_w(progid));
> - return CO_E_CLASSSTRING;
> + lstrcpyW(buf, progid);
> + lstrcatW(buf, L"\\CurVer");
> + if (RegQueryValueW(HKEY_CLASSES_ROOT, buf, buf3, &buf3len))
> + {
> + free(buf);
> + WARN("couldn't query CurVer value for ProgID %s\n", debugstr_w(progid));
> + return CO_E_CLASSSTRING;
> + }
> +
> + lstrcpyW(buf, buf3);
> + lstrcatW(buf, L"\\CLSID");
Size of 'buf' has no relation to size of 'buf3', so you can't assume you can copy things and not overrun it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7539#note_115152
Nikolay Sivov (@nsivov) commented about dlls/combase/combase.c:
>
> static HRESULT clsid_from_string_reg(LPCOLESTR progid, CLSID *clsid)
> {
> - WCHAR buf2[CHARS_IN_GUID];
> + WCHAR buf2[CHARS_IN_GUID],buf3[CHARS_IN_GUID];
> LONG buf2len = sizeof(buf2);
> + LONG buf3len = sizeof(buf3);
Those should be renamed to something more intuitive. Also buf3 here does not contain a stringified GUID but ProgID, so using CHARS_IN_GUID length is incorrect.
What happens if ProgID referenced with CurVer itself contains another CurVer, is it followed?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7539#note_115151
Nikolay Sivov (@nsivov) commented about dlls/ole32/tests/compobj.c:
> ok(IsEqualCLSID(&clsid, &CLSID_StdFont), "clsid wasn't equal to CLSID_StdFont\n");
>
> /* test some failure cases */
This comment does not belong to this new test.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7539#note_115150
Trivial, small set of cleanups patches to start with, non-controversial and NOP functionally speaking.
These are to help get the review process going in making ways towards the bar being lowered for contributing to the oleaut32 implementation.
Signed-off-by: Edward O'Callaghan <edward(a)antitrust.cc>
--
v4: dlls/oleaut32: Invert if-stmt in ITypeLib2_fnRelease()
dlls/oleaut32: Invert if stmt for clarity
dlls/oleaut32: Consistently use TLB_REF_NOT_FOUND
https://gitlab.winehq.org/wine/wine/-/merge_requests/7375
- Clean up method implementations to be consistent and pass tests.
- Factor out common code.
- Validate arguments.
- Correctly match szNameBuf user passed strings as case-insensitive as per documentation.
- Match method parameter identifiers to be as per documentation.
- Rewrite where required to use common helpers.
Signed-off-by: Edward O'Callaghan <edward(a)antitrust.cc>
--
v3: oleaut32: Factor out TLB_get_typeinfo_by_guid()
https://gitlab.winehq.org/wine/wine/-/merge_requests/7449
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v11: dlls/oleaut32: ptr_size should be a ULONG
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203