Adding test cases.

This commit is contained in:
Benjamin Rodes
2024-01-26 15:19:07 -05:00
parent 562221f48e
commit b7648bcf27

View File

@@ -31,4 +31,26 @@ void Test()
fconstWChar((LPCWSTR)lpWchar); // Valid
fWChar(lpWchar); // Valid
}
void NewBufferFalsePositiveTest()
{
wchar_t *lpWchar = NULL;
lpWchar = (LPWSTR)new char[56]; // Possible False Positive
}
typedef unsigned char BYTE;
typedef BYTE* PBYTE;
void NonStringFalsePositiveTest1(PBYTE buffer)
{
wchar_t *lpWchar = NULL;
lpWchar = (LPWSTR)buffer; // Possible False Positive
}
void NonStringFalsePositiveTest2(unsigned char* buffer)
{
wchar_t *lpWchar = NULL;
lpWchar = (LPWSTR)buffer; // Possible False Positive
}