File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
cpp/ql/src/Security/CWE/CWE-253 Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44<qhelp >
55
66<overview >
7- <p >This query indicates that an <code >HRESULT</code > is being cast to a boolean type or vice versa.</p >
8- <p >The typical success value (<code >S_OK</code >) of an <code >HRESULT</code > equals 0. However, 0 indicates failure for a boolean type.</p >
9- <p >Casting an <code >HRESULT</code > to a boolean type and then using it in a test expression will yield an incorrect result.</p >
7+ <p >This query indicates that an <code >HRESULT</code > is being cast to a Boolean type or vice versa.</p >
8+ <p >The typical success value (<code >S_OK</code >) of an <code >HRESULT</code > equals 0. However, 0 indicates failure for a Boolean type.</p >
9+ <p >Casting an <code >HRESULT</code > to a Boolean type and then using it in a test expression will yield an incorrect result.</p >
1010</overview >
1111
1212<recommendation >
13- <p >To check if a call that returns an HRESULT succeeded use the <code >FAILED</code > macro.</p >
13+ <p >To check if a call that returns an < code > HRESULT</ code > succeeded use the <code >FAILED</code > macro.</p >
1414</recommendation >
1515
1616<example >
You can’t perform that action at this time.
0 commit comments