File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
cpp/ql/src/Security/CWE/CWE-704 Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,9 @@ class UnicodeMacroInvocation extends MacroInvocation {
78
78
* the flag would indicate if UNICODE typing is set correctly to allow
79
79
* or disallow a widening cast.
80
80
*/
81
- predicate isLikelyDynamicChecked ( Expr e , GuardCondition gc ) {
81
+ predicate isLikelyDynamicallyChecked ( Expr e ) {
82
82
e .getType ( ) instanceof UnicodeMacroDependentWidthType and
83
- exists ( BitwiseAndExpr bai , UnicodeMacroInvocation umi | bai .getAnOperand ( ) = umi .getExpr ( ) |
83
+ exists ( GuardCondition gc , BitwiseAndExpr bai , UnicodeMacroInvocation umi | bai .getAnOperand ( ) = umi .getExpr ( ) |
84
84
// bai == 0 is false when reaching `e.getBasicBlock()`.
85
85
// That is, bai != 0 when reaching `e.getBasicBlock()`.
86
86
gc .ensuresEq ( bai , 0 , e .getBasicBlock ( ) , false )
@@ -106,7 +106,7 @@ where
106
106
// Avoid cases where the cast is guarded by a check to determine if
107
107
// unicode encoding is enabled in such a way to disallow the dangerous cast
108
108
// at runtime.
109
- not isLikelyDynamicChecked ( e1 , _ )
109
+ not isLikelyDynamicallyChecked ( e1 )
110
110
select e1 ,
111
111
"Conversion from " + e1 .getType ( ) .toString ( ) + " to " + e2 .getType ( ) .toString ( ) +
112
112
". Use of invalid string can lead to undefined behavior."
You can’t perform that action at this time.
0 commit comments