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 {
7878 * the flag would indicate if UNICODE typing is set correctly to allow
7979 * or disallow a widening cast.
8080 */
81- predicate isLikelyDynamicChecked ( Expr e , GuardCondition gc ) {
81+ predicate isLikelyDynamicallyChecked ( Expr e ) {
8282 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 ( ) |
8484 // bai == 0 is false when reaching `e.getBasicBlock()`.
8585 // That is, bai != 0 when reaching `e.getBasicBlock()`.
8686 gc .ensuresEq ( bai , 0 , e .getBasicBlock ( ) , false )
@@ -106,7 +106,7 @@ where
106106 // Avoid cases where the cast is guarded by a check to determine if
107107 // unicode encoding is enabled in such a way to disallow the dangerous cast
108108 // at runtime.
109- not isLikelyDynamicChecked ( e1 , _ )
109+ not isLikelyDynamicallyChecked ( e1 )
110110select e1 ,
111111 "Conversion from " + e1 .getType ( ) .toString ( ) + " to " + e2 .getType ( ) .toString ( ) +
112112 ". Use of invalid string can lead to undefined behavior."
You can’t perform that action at this time.
0 commit comments