http://bugs.winehq.org/show_bug.cgi?id=20503
Summary: ref counting bug in crypt32 Product: Wine Version: 1.1.32 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: crypt32 AssignedTo: wine-bugs@winehq.org ReportedBy: juan_lang@yahoo.com
Created an attachment (id=24412) --> (http://bugs.winehq.org/attachment.cgi?id=24412) Show presence of ref counting bug
crypt32 uses ref counting to keep track of certificates, CRLs, and CTLs. The ref counting isn't done correctly, which can be seen by running 'WINEDEBUG=crypt make store.ok' in the tests. Looking through the output you'll find instances where the ref count becomes negative.
I'm attaching a patch which adds an assert that the ref count is positive before decrementing it. Applying the patch and running 'make store.ok' produces an assertion failure: context.c:150: Context_Release: Assertion `base->ref > 0' failed.