Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f91e33

Browse files
author
Nikita Kraiouchkine
committed
EXP43-C: Refactor and remove test code
Remove an accidental `isBarrier` predicate left in from development
1 parent46abe38 commit2f91e33

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

‎c/cert/src/rules/EXP43-C/DoNotPassAliasedPointerToRestrictQualifiedParam.ql‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ class PointerValueToRestrictArgConfig extends DataFlow::Configuration {
115115
}
116116

117117
from
118-
CallToFunctionWithRestrictParameterscall,CallToFunctionWithRestrictParametersArgExprarg1,
118+
PointerValueToRestrictArgConfigconfig,CallToFunctionWithRestrictParameterscall,
119+
CallToFunctionWithRestrictParametersArgExprarg1,
119120
CallToFunctionWithRestrictParametersArgExprarg2,intargOffset1,intargOffset2,Exprsource1,
120121
Exprsource2,stringsourceMessage1,stringsourceMessage2
121122
where
@@ -124,8 +125,8 @@ where
124125
arg2=call.getAPtrArg(_)and
125126
// enforce ordering to remove permutations if multiple restrict-qualified args exist
126127
(notarg2=call.getARestrictPtrArg()orarg2.getParamIndex()>arg1.getParamIndex())and
127-
// check if two pointers address the same object
128-
exists(PointerValueToRestrictArgConfigconfig|
128+
(
129+
// check if two pointers address the same object
129130
config.hasFlow(DataFlow::exprNode(source1), DataFlow::exprNode(arg1.getAChild*()))and
130131
(
131132
// one pointer value flows to both args

‎c/cert/src/rules/EXP43-C/RestrictPointerReferencesOverlappingObject.ql‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ class AssignedValueToRestrictPtrValueConfiguration extends DataFlow::Configurati
5151
overridepredicateisSink(DataFlow::Nodesink){
5252
sink.asExpr()instanceofAssignmentOrInitializationToRestrictPtrValueExpr
5353
}
54-
55-
overridepredicateisBarrierIn(DataFlow::Nodenode){
56-
isSource(node)
57-
}
5854
}
5955

6056
from

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp