Detlef Riekenberg wine.dev@web.de writes:
@@ -336,11 +336,13 @@ static void testStringToBinaryA(void) /* Bad strings */ for (i = 0; i < sizeof(badStrings) / sizeof(badStrings[0]); i++) {
bufLen = 0;
bufLen = 0xdeadbeef;
SetLastError(0xdeadbeef);
/* This succeeds on Windows 10 with our CRYPT_STRING_BASE64 test data */ ret = pCryptStringToBinaryA(badStrings[i].str, 0, badStrings[i].format, NULL, &bufLen, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_DATA,
"Expected ERROR_INVALID_DATA, got ret=%d le=%u\n", ret, GetLastError());
ok((!ret && GetLastError() == ERROR_INVALID_DATA) || broken(ret),
"%d: Expected FALSE with ERROR_INVALID_DATA, got ret=%d le=%u len=%d\n", i, ret, GetLastError(), bufLen);
I'm not convinced this should be considered broken. It would be worth testing some other truly bad strings, and the CRYPT_STRING_STRICT flag also.