You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Cast between HRESULT and a Boolean type (`cpp/hresult-boolean-conversion`) | external/cwe/cwe-253 | Finds logic errors caused by mistakenly treating the Windows `HRESULT` type as a Boolean instead of testing it with the appropriate macros. Enabled by default. |
10
+
| Setting a DACL to `NULL` in a `SECURITY_DESCRIPTOR` (`cpp/unsafe-dacl-security-descriptor`) | external/cwe/cwe-732 | This query finds code that creates world-writable objects on Windows by setting their DACL to `NULL`. Enabled by default. |
9
11
| Cast from char* to wchar_t*| security, external/cwe/cwe-704 | Detects potentially dangerous casts from char* to wchar_t*. Enabled by default on LGTM. |
Copy file name to clipboardExpand all lines: cpp/ql/src/Security/CWE/CWE-253/HResultBooleanConversion.ql
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
/**
2
-
* @name Cast between semantically different integer types: HRESULT to/from a Boolean type
3
-
* @description Cast between semantically different integer types: HRESULT to/from a Boolean type.
4
-
* Boolean types indicate success by a non-zero value, whereas success (S_OK) in HRESULT is indicated by a value of 0.
5
-
* Casting an HRESULT to/from a Boolean type and then using it in a test expression will yield an incorrect result.
2
+
* @name Cast between HRESULT and a Boolean type
3
+
* @description Casting an HRESULT to/from a Boolean type and then using it in a test expression will yield an incorrect result because success (S_OK) in HRESULT is indicated by a value of 0.
0 commit comments