Skip to content

Commit 0c3f4e5

Browse files
committed
CPP: Make some library predicates private.
1 parent 399ac1f commit 0c3f4e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cpp/ql/src/Security/CWE/CWE-457/InitializationFunctions.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ Expr getAnInitializedArgument(Call call) { result = call.getArgument(initialized
567567
* the call, under the given context and evidence.
568568
*/
569569
pragma[nomagic]
570-
int conditionallyInitializedArgument(
570+
private int conditionallyInitializedArgument(
571571
Call call, ConditionalInitializationFunction target, Context c, Evidence e
572572
) {
573573
target = getTarget(call) and
@@ -588,7 +588,7 @@ Expr getAConditionallyInitializedArgument(
588588
/**
589589
* Gets the type signature for the functions parameters.
590590
*/
591-
string typeSig(Function f) {
591+
private string typeSig(Function f) {
592592
result = concat(int i, Type pt |
593593
pt = f.getParameter(i).getType()
594594
|
@@ -599,7 +599,7 @@ string typeSig(Function f) {
599599
/**
600600
* Holds where qualifiedName and typeSig make up the signature for the function.
601601
*/
602-
predicate functionSignature(Function f, string qualifiedName, string typeSig) {
602+
private predicate functionSignature(Function f, string qualifiedName, string typeSig) {
603603
qualifiedName = f.getQualifiedName() and
604604
typeSig = typeSig(f)
605605
}
@@ -611,7 +611,7 @@ predicate functionSignature(Function f, string qualifiedName, string typeSig) {
611611
* This is useful for identifying call to target dependencies across libraries, where the libraries
612612
* are never statically linked together.
613613
*/
614-
Function getAPossibleDefinition(Function undefinedFunction) {
614+
private Function getAPossibleDefinition(Function undefinedFunction) {
615615
not undefinedFunction.isDefined() and
616616
exists(string qn, string typeSig |
617617
functionSignature(undefinedFunction, qn, typeSig) and functionSignature(result, qn, typeSig)

0 commit comments

Comments
 (0)