typelib has an array size of 2 (eg LibXml_Last), so a lookup
of IID_NULL will result in a lookup of the third index.
--
v6: msxml3: Do not leak bind context on error paths (Coverity)
https://gitlab.winehq.org/wine/wine/-/merge_requests/4073
Okay, oh dear. I need to apologize it's the first time I contribute to wine and as always the user learns over time.
Now I have the build environment on a Windows 10 Machine set up and I can run the testbench on Windows as well. Cool feature!
Lesson learned:
I focussed on the unbalanced parentheses case first. Windows quits/ends the complete `cmd` execution if it do a `call block_if_eof1.cmd`. Did you have this case yet? In regards of testing this means I need to setup a own `.cmd`/`.cmd.exp` file again?
Lets form a simple setup
```
echo @echo off>block_if_eof1.cmd
echo echo sanity1>>block_if_eof1.cmd
echo if 1 == 1 (>>block_if_eof1.cmd
echo echo should not be executed>>block_if_eof1.cmd
call block_if_eof1.cmd
REM This command is NEVER executed as cmd exe quited.
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4168#note_49957
On Thu Oct 26 17:31:50 2023 +0000, eric pouech wrote:
> nitpick: you could have saved one line of modif by keeping the == 0x00
> test (instead of rewritten to 0x0)
Can fix that as well. No Problem must have happened while fixup.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4168#note_49956
typelib has an array size of 2 (eg LibXml_Last), so a lookup
of IID_NULL will result in a lookup of the third index.
--
v5: msxml3: Free IBindCtx on error paths (Coverity)
msxml3: Move tid_NULL out of possible enum values.
msxml3: Dont call qsort if we have no data (Coverity).
https://gitlab.winehq.org/wine/wine/-/merge_requests/4073
typelib has an array size of 2 (eg LibXml_Last), so a lookup
of IID_NULL will result in a lookup of the third index.
--
v4: msxml3: Free IBindCtx on error paths (Coverity)
https://gitlab.winehq.org/wine/wine/-/merge_requests/4073
On Fri Oct 27 00:52:11 2023 +0000, Nikolay Sivov wrote:
> If it's a matter of silencing typelib[LibXml_Last] access warning, just
> change it to LibXml2, and add an assert for tid range in get_typeinfo().
Or maybe just change Last -> LibXml2, without asserts. All the calls are internal, there is more value in keeping this looking close to other modules using the same logic, than trying to fix what can't happen.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4073#note_49942
Nikolay Sivov (@nsivov) commented about dlls/msxml3/httprequest.c:
> if (!(ptr = heap_alloc(size)))
> {
> heap_free(bsc);
> + IBindCtx_Release(pbc);
> return E_OUTOFMEMORY;
> }
It will be a smaller change to move context creation right before it's used.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4073#note_49937
On Thu Oct 19 03:42:38 2023 +0000, Alex Henrie wrote:
> You could change the first element of tid_ids from { &IID_NULL,
> LibXml_Last } to { NULL } to make it more clear that it is never used.
> Or, if we can't come to a consensus, you could mark the warning as a
> false positive in Coverity with a link to this discussion.
If it's a matter of silencing typelib[LibXml_Last] access warning, just change it to LibXml2, and add an assert for tid range in get_typeinfo().
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4073#note_49936