We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 562221f commit b7648bcCopy full SHA for b7648bc
cpp/ql/test/query-tests/Security/CWE/CWE-704/WcharCharConversion.cpp
@@ -31,4 +31,26 @@ void Test()
31
32
fconstWChar((LPCWSTR)lpWchar); // Valid
33
fWChar(lpWchar); // Valid
34
+}
35
+
36
+void NewBufferFalsePositiveTest()
37
+{
38
+ wchar_t *lpWchar = NULL;
39
40
+ lpWchar = (LPWSTR)new char[56]; // Possible False Positive
41
42
43
+typedef unsigned char BYTE;
44
+typedef BYTE* PBYTE;
45
46
+void NonStringFalsePositiveTest1(PBYTE buffer)
47
48
49
+ lpWchar = (LPWSTR)buffer; // Possible False Positive
50
51
52
+void NonStringFalsePositiveTest2(unsigned char* buffer)
53
54
55
56
}
0 commit comments