25 Jun
2025
25 Jun
'25
12:49 a.m.
The docs say it should be released in the last CryptMsgUpdate, but tests show it's actually released in CryptMsgClose. So let's do the same. This solve a use-after-free issue for signed messages, because they contains HCRYPTHASH objects which references the context internally, and will use it in CryptDestroyHash. If the context is released in CSignedEncodeMsg_Open, this will be a use-after-free. -- v2: crypt32: Don't release context in CSignedEncodeMsg_Open. https://gitlab.winehq.org/wine/wine/-/merge_requests/8376