Skip to content

Commit 783be15

Browse files
Fixing typos & ID.
NOTE: There is an ongoing discussion on the proper CWE we should use
1 parent b0ec929 commit 783be15

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cpp/ql/src/Security/CWE/CWE-704/IncorrectTypeConversion.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Boolean types indicate success by a non-zero value, whereas success (S_OK) in HRESULT is indicated by a value of 0.
55
* Casting an HRESULT to/from a Boolean type and then using it in a test expression will yield an incorrect result.
66
* @kind problem
7-
* @id cpp/incorrect-type-conversion
7+
* @id cpp/hresult-to-boolean-conversion
88
* @problem.severity error
99
* @precision high
1010
* @tags security

cpp/ql/test/query-tests/Security/CWE/CWE-704/IncorrectTypeConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void IncorrectTypeConversionTest() {
6565
}
6666

6767
hr = S_FALSE;
68-
if (hr) // Should fail
68+
if (hr) // BUG
6969
{
7070
// ...
7171
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Security/CWE/CWE-704/incorrectTypeConversion.ql
1+
Security/CWE/CWE-704/IncorrectTypeConversion.ql

0 commit comments

Comments
 (0)