http://bugs.winehq.org/show_bug.cgi?id=20918
Summary: Many valgrind warnings in advapi32/crypt tests in test_incorrect_api_usage() Product: Wine Version: 1.1.33 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: crypt32 AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
http://kegel.com/wine/valgrind/logs/2009-12-03-17.17/vg-advapi32_crypt.txt has a dozen or so invalid read and memory leak warnings. I'm going to suppress the invalid read errors on the theory that they are intended and benign. If this is so, please close this bug as invalid.
(As usual, the suppression name will contain the number of this bug so people wondering what it's for can find the bug report and any discussion.)
http://bugs.winehq.org/show_bug.cgi?id=20918
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase
http://bugs.winehq.org/show_bug.cgi?id=20918
Juan Lang juan_lang@yahoo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID
--- Comment #1 from Juan Lang juan_lang@yahoo.com 2009-12-06 17:42:55 --- That's correct, this appears to be invalid. For example,
Invalid read of size 4 at CryptSetKeyParam (crypt.c:1961) by test_incorrect_api_usage (crypt.c:250)
advapi32/crypt.c, line 1961: if (!key || !pbData || !key->pProvider || key->pProvider->dwMagic != MAGIC_CRYPTPROV)
That is, it dereferences key. advapi32/tests/crypt.c, lines leading up to 250: result = pCryptDestroyKey(hKey2); ok (result, "%d\n", GetLastError());
dwTemp = CRYPT_MODE_ECB; result = pCryptSetKeyParam(hKey2, KP_MODE, (BYTE*)&dwTemp, sizeof(DWORD));
That is, the key has been destroyed just prior to calling CryptSetKeyParam on it. Finally, in CryptDestroyKey: ret = prov->pFuncs->pCPDestroyKey(prov->hPrivate, key->hPrivate); CRYPT_Free(key);
key is a pointer, rather than a handle, and it's been freed. So the read is invalid, as expected.
http://bugs.winehq.org/show_bug.cgi?id=20918
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Dan Kegel dank@kegel.com 2009-12-06 19:46:01 --- Closing invalid.