Skip to content

Commit 2218b3f

Browse files
authored
Merge branch 'main' into lcartey/m5-0-20-pointers
2 parents d5edce5 + 9f408a0 commit 2218b3f

File tree

326 files changed

+864
-555
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

326 files changed

+864
-555
lines changed

.github/workflows/validate-coding-standards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ jobs:
8989

9090
- name: Validate CodeQL Format (CPP)
9191
run: |
92-
find cpp -name \*.ql -or -name \*.qll -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
92+
find cpp \( -name \*.ql -or -name \*.qll \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
9393
9494
git diff
9595
git diff --compact-summary
9696
git diff --quiet
9797
9898
- name: Validate CodeQL Format (C)
9999
run: |
100-
find c -name \*.ql -or -name \*.qll -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
100+
find c \( -name \*.ql -or -name \*.qll \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" codeql query format --in-place
101101
102102
git diff
103103
git diff --compact-summary

c/cert/src/codeql-pack.lock.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22
lockVersion: 1.0.0
33
dependencies:
44
codeql/cpp-all:
5-
version: 0.6.1
5+
version: 0.9.3
6+
codeql/dataflow:
7+
version: 0.0.4
68
codeql/ssa:
7-
version: 0.0.14
9+
version: 0.1.5
810
codeql/tutorial:
9-
version: 0.0.7
11+
version: 0.1.5
12+
codeql/util:
13+
version: 0.1.5
1014
compiled: false

c/cert/src/codeql-suites/cert-default.qls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
- path-problem
77
- exclude:
88
tags contain:
9-
- external/cert/default-disabled
9+
- external/cert/default-disabled

c/cert/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ suites: codeql-suites
55
license: MIT
66
dependencies:
77
codeql/common-c-coding-standards: '*'
8-
codeql/cpp-all: 0.6.1
8+
codeql/cpp-all: 0.9.3

c/cert/src/rules/ARR30-C/DoNotFormOutOfBoundsPointersOrArraySubscripts.ql

Lines changed: 39 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,42 @@
1212
* external/cert/obligation/rule
1313
*/
1414

15-
import cpp
16-
import codingstandards.c.cert
17-
import codingstandards.c.OutOfBounds
18-
19-
from
20-
OOB::BufferAccess ba, Expr bufferArg, Expr sizeArg, OOB::PointerToObjectSource bufferSource,
21-
string message
22-
where
23-
not isExcluded(ba, OutOfBoundsPackage::doNotFormOutOfBoundsPointersOrArraySubscriptsQuery()) and
24-
// exclude loops
25-
not exists(Loop loop | loop.getStmt().getChildStmt*() = ba.getEnclosingStmt()) and
26-
// exclude size arguments that are of type ssize_t
27-
not sizeArg.getAChild*().(VariableAccess).getTarget().getType() instanceof Ssize_t and
28-
// exclude size arguments that are assigned the result of a function call e.g. ftell
29-
not sizeArg.getAChild*().(VariableAccess).getTarget().getAnAssignedValue() instanceof FunctionCall and
30-
// exclude field or array accesses for the size arguments
31-
not sizeArg.getAChild*() instanceof FieldAccess and
32-
not sizeArg.getAChild*() instanceof ArrayExpr and
33-
(
34-
exists(int sizeArgValue, int bufferArgSize |
35-
OOB::isSizeArgGreaterThanBufferSize(bufferArg, sizeArg, bufferSource, bufferArgSize, sizeArgValue, ba) and
36-
message =
37-
"Buffer accesses offset " + sizeArgValue +
38-
" which is greater than the fixed size " + bufferArgSize + " of the $@."
39-
)
40-
or
41-
exists(int sizeArgUpperBound, int sizeMult, int bufferArgSize |
42-
OOB::isSizeArgNotCheckedLessThanFixedBufferSize(bufferArg, sizeArg, bufferSource,
43-
bufferArgSize, ba, sizeArgUpperBound, sizeMult) and
44-
message =
45-
"Buffer may access up to offset " + sizeArgUpperBound + "*" + sizeMult +
46-
" which is greater than the fixed size " + bufferArgSize + " of the $@."
47-
)
48-
or
49-
OOB::isSizeArgNotCheckedGreaterThanZero(bufferArg, sizeArg, bufferSource, ba) and
50-
message = "Buffer access may be to a negative index in the buffer."
51-
)
52-
select ba, message, bufferSource, "buffer"
15+
import cpp
16+
import codingstandards.c.cert
17+
import codingstandards.c.OutOfBounds
18+
19+
from
20+
OOB::BufferAccess ba, Expr bufferArg, Expr sizeArg, OOB::PointerToObjectSource bufferSource,
21+
string message
22+
where
23+
not isExcluded(ba, OutOfBoundsPackage::doNotFormOutOfBoundsPointersOrArraySubscriptsQuery()) and
24+
// exclude loops
25+
not exists(Loop loop | loop.getStmt().getChildStmt*() = ba.getEnclosingStmt()) and
26+
// exclude size arguments that are of type ssize_t
27+
not sizeArg.getAChild*().(VariableAccess).getTarget().getType() instanceof Ssize_t and
28+
// exclude size arguments that are assigned the result of a function call e.g. ftell
29+
not sizeArg.getAChild*().(VariableAccess).getTarget().getAnAssignedValue() instanceof FunctionCall and
30+
// exclude field or array accesses for the size arguments
31+
not sizeArg.getAChild*() instanceof FieldAccess and
32+
not sizeArg.getAChild*() instanceof ArrayExpr and
33+
(
34+
exists(int sizeArgValue, int bufferArgSize |
35+
OOB::isSizeArgGreaterThanBufferSize(bufferArg, sizeArg, bufferSource, bufferArgSize,
36+
sizeArgValue, ba) and
37+
message =
38+
"Buffer accesses offset " + sizeArgValue + " which is greater than the fixed size " +
39+
bufferArgSize + " of the $@."
40+
)
41+
or
42+
exists(int sizeArgUpperBound, int sizeMult, int bufferArgSize |
43+
OOB::isSizeArgNotCheckedLessThanFixedBufferSize(bufferArg, sizeArg, bufferSource,
44+
bufferArgSize, ba, sizeArgUpperBound, sizeMult) and
45+
message =
46+
"Buffer may access up to offset " + sizeArgUpperBound + "*" + sizeMult +
47+
" which is greater than the fixed size " + bufferArgSize + " of the $@."
48+
)
49+
or
50+
OOB::isSizeArgNotCheckedGreaterThanZero(bufferArg, sizeArg, bufferSource, ba) and
51+
message = "Buffer access may be to a negative index in the buffer."
52+
)
53+
select ba, message, bufferSource, "buffer"

c/cert/src/rules/ARR36-C/DoNotRelatePointersThatDoNotReferToTheSameArray.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.rules.donotuserelationaloperatorswithdifferingarrays.DoNotUseRelationalOperatorsWithDifferingArrays
1717

18-
class DoNotRelatePointersThatDoNotReferToTheSameArrayQuery extends DoNotUseRelationalOperatorsWithDifferingArraysSharedQuery {
18+
class DoNotRelatePointersThatDoNotReferToTheSameArrayQuery extends DoNotUseRelationalOperatorsWithDifferingArraysSharedQuery
19+
{
1920
DoNotRelatePointersThatDoNotReferToTheSameArrayQuery() {
2021
this = Memory2Package::doNotRelatePointersThatDoNotReferToTheSameArrayQuery()
2122
}

c/cert/src/rules/ARR36-C/DoNotSubtractPointersThatDoNotReferToTheSameArray.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.rules.donotsubtractpointersaddressingdifferentarrays.DoNotSubtractPointersAddressingDifferentArrays
1717

18-
class DoNotSubtractPointersThatDoNotReferToTheSameArrayQuery extends DoNotSubtractPointersAddressingDifferentArraysSharedQuery {
18+
class DoNotSubtractPointersThatDoNotReferToTheSameArrayQuery extends DoNotSubtractPointersAddressingDifferentArraysSharedQuery
19+
{
1920
DoNotSubtractPointersThatDoNotReferToTheSameArrayQuery() {
2021
this = Memory2Package::doNotSubtractPointersThatDoNotReferToTheSameArrayQuery()
2122
}

c/cert/src/rules/ARR37-C/DoNotUsePointerArithmeticOnNonArrayObjectPointers.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import cpp
1515
import codingstandards.c.cert
16-
import semmle.code.cpp.dataflow.DataFlow
16+
import codingstandards.cpp.dataflow.DataFlow
1717
import DataFlow::PathGraph
1818

1919
/**

c/cert/src/rules/ARR38-C/LibraryFunctionArgumentOutOfBounds.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ from
2222
where
2323
not isExcluded(fc, OutOfBoundsPackage::libraryFunctionArgumentOutOfBoundsQuery()) and
2424
OOB::problems(fc, message, bufferArg, bufferArgStr, sizeOrOtherBufferArg, otherStr)
25-
select fc, message, bufferArg, bufferArgStr, sizeOrOtherBufferArg, otherStr
25+
select fc, message, bufferArg, bufferArgStr, sizeOrOtherBufferArg, otherStr

c/cert/src/rules/ARR39-C/DoNotAddOrSubtractAScaledIntegerToAPointer.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.c.Pointers
17-
import semmle.code.cpp.dataflow.TaintTracking
17+
import codingstandards.cpp.dataflow.TaintTracking
1818
import DataFlow::PathGraph
1919

2020
/**

c/cert/src/rules/CON30-C/CleanUpThreadSpecificStorage.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.Concurrency
18-
import semmle.code.cpp.dataflow.TaintTracking
19-
import semmle.code.cpp.dataflow.DataFlow
18+
import codingstandards.cpp.dataflow.TaintTracking
19+
import codingstandards.cpp.dataflow.DataFlow
2020

2121
class TssCreateToTssDeleteDataFlowConfiguration extends DataFlow::Configuration {
2222
TssCreateToTssDeleteDataFlowConfiguration() { this = "TssCreateToTssDeleteDataFlowConfiguration" }

c/cert/src/rules/CON31-C/DoNotAllowAMutexToGoOutOfScopeWhileLocked.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.rules.donotallowamutextogooutofscopewhilelocked.DoNotAllowAMutexToGoOutOfScopeWhileLocked
1818

19-
class DoNotAllowAMutexToGoOutOfScopeWhileLockedQuery extends DoNotAllowAMutexToGoOutOfScopeWhileLockedSharedQuery {
19+
class DoNotAllowAMutexToGoOutOfScopeWhileLockedQuery extends DoNotAllowAMutexToGoOutOfScopeWhileLockedSharedQuery
20+
{
2021
DoNotAllowAMutexToGoOutOfScopeWhileLockedQuery() {
2122
this = Concurrency3Package::doNotAllowAMutexToGoOutOfScopeWhileLockedQuery()
2223
}

c/cert/src/rules/CON33-C/RaceConditionsWhenUsingLibraryFunctions.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ where
2424
"setlocale", "atomic_init", "ATOMIC_VAR_INIT", "tmpnam", "mbrtoc16", "c16rtomb", "mbrtoc32",
2525
"c32rtomb"
2626
]
27-
select node,
28-
"Concurrent call to non-reeantrant function $@.", node.(FunctionCall).getTarget(), node.(FunctionCall).getTarget().getName()
27+
select node, "Concurrent call to non-reeantrant function $@.", node.(FunctionCall).getTarget(),
28+
node.(FunctionCall).getTarget().getName()

c/cert/src/rules/CON34-C/AppropriateThreadObjectStorageDurations.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.Concurrency
18-
import semmle.code.cpp.dataflow.TaintTracking
19-
import semmle.code.cpp.dataflow.DataFlow
18+
import codingstandards.cpp.dataflow.TaintTracking
19+
import codingstandards.cpp.dataflow.DataFlow
2020
import semmle.code.cpp.commons.Alloc
2121

2222
from C11ThreadCreateCall tcc, StackVariable sv, Expr arg, Expr acc

c/cert/src/rules/CON34-C/ThreadObjectStorageDurationsNotInitialized.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import cpp
1717
import codingstandards.c.cert
1818
import codingstandards.cpp.Concurrency
19-
import semmle.code.cpp.dataflow.TaintTracking
20-
import semmle.code.cpp.dataflow.DataFlow
19+
import codingstandards.cpp.dataflow.TaintTracking
20+
import codingstandards.cpp.dataflow.DataFlow
2121

2222
from TSSGetFunctionCall tsg, ThreadedFunction tf
2323
where

c/cert/src/rules/CON35-C/DeadlockByLockingInPredefinedOrder.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.rules.preventdeadlockbylockinginpredefinedorder.PreventDeadlockByLockingInPredefinedOrder
1818

19-
class DeadlockByLockingInPredefinedOrderQuery extends PreventDeadlockByLockingInPredefinedOrderSharedQuery {
19+
class DeadlockByLockingInPredefinedOrderQuery extends PreventDeadlockByLockingInPredefinedOrderSharedQuery
20+
{
2021
DeadlockByLockingInPredefinedOrderQuery() {
2122
this = Concurrency2Package::deadlockByLockingInPredefinedOrderQuery()
2223
}

c/cert/src/rules/CON37-C/DoNotCallSignalInMultithreadedProgram.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ where
2424
not isExcluded(fc, Concurrency1Package::doNotCallSignalInMultithreadedProgramQuery()) and
2525
fc.getTarget().getName() = "signal" and
2626
exists(ThreadedFunction f)
27-
select fc,
28-
"Call to `signal()` in multithreaded programs."
27+
select fc, "Call to `signal()` in multithreaded programs."

c/cert/src/rules/CON38-C/PreserveSafetyWhenUsingConditionVariables.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.rules.preservesafetywhenusingconditionvariables.PreserveSafetyWhenUsingConditionVariables
1818

19-
class PreserveSafetyWhenUsingConditionVariablesQuery extends PreserveSafetyWhenUsingConditionVariablesSharedQuery {
19+
class PreserveSafetyWhenUsingConditionVariablesQuery extends PreserveSafetyWhenUsingConditionVariablesSharedQuery
20+
{
2021
PreserveSafetyWhenUsingConditionVariablesQuery() {
2122
this = Concurrency3Package::preserveSafetyWhenUsingConditionVariablesQuery()
2223
}

c/cert/src/rules/CON41-C/WrapFunctionsThatCanFailSpuriouslyInLoop.ql

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@
1212
* external/cert/obligation/rule
1313
*/
1414

15-
import cpp
16-
import codingstandards.c.cert
17-
import codingstandards.cpp.Concurrency
18-
15+
import cpp
16+
import codingstandards.c.cert
17+
import codingstandards.cpp.Concurrency
1918

20-
from AtomicCompareExchange ace
21-
where
22-
not isExcluded(ace, Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery()) and
23-
(
24-
forex(StmtParent sp | sp = ace.getStmt() | not sp.(Stmt).getParentStmt*() instanceof Loop) or
25-
forex(Expr e | e = ace.getExpr() | not e.getEnclosingStmt().getParentStmt*()
26-
instanceof Loop)
27-
)
28-
select ace, "Function that can spuriously fail not wrapped in a loop."
29-
19+
from AtomicCompareExchange ace
20+
where
21+
not isExcluded(ace, Concurrency3Package::wrapFunctionsThatCanFailSpuriouslyInLoopQuery()) and
22+
(
23+
forex(StmtParent sp | sp = ace.getStmt() | not sp.(Stmt).getParentStmt*() instanceof Loop)
24+
or
25+
forex(Expr e | e = ace.getExpr() | not e.getEnclosingStmt().getParentStmt*() instanceof Loop)
26+
)
27+
select ace, "Function that can spuriously fail not wrapped in a loop."

c/cert/src/rules/DCL30-C/AppropriateStorageDurationsFunctionReturn.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import cpp
1515
import codingstandards.c.cert
16-
import semmle.code.cpp.dataflow.DataFlow
16+
import codingstandards.cpp.dataflow.DataFlow
1717

1818
class Source extends StackVariable {
1919
Source() { not this instanceof Parameter }

c/cert/src/rules/DCL30-C/AppropriateStorageDurationsStackAdressEscape.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.rules.donotcopyaddressofautostorageobjecttootherobject.DoNotCopyAddressOfAutoStorageObjectToOtherObject
1717

18-
class AppropriateStorageDurationsStackAdressEscapeQuery extends DoNotCopyAddressOfAutoStorageObjectToOtherObjectSharedQuery {
18+
class AppropriateStorageDurationsStackAdressEscapeQuery extends DoNotCopyAddressOfAutoStorageObjectToOtherObjectSharedQuery
19+
{
1920
AppropriateStorageDurationsStackAdressEscapeQuery() {
2021
this = Declarations8Package::appropriateStorageDurationsStackAdressEscapeQuery()
2122
}

c/cert/src/rules/DCL39-C/InformationLeakageAcrossTrustBoundariesC.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.rules.informationleakageacrossboundaries.InformationLeakageAcrossBoundaries
1717

18-
class InformationLeakageAcrossTrustBoundariesCQuery extends InformationLeakageAcrossBoundariesSharedQuery {
18+
class InformationLeakageAcrossTrustBoundariesCQuery extends InformationLeakageAcrossBoundariesSharedQuery
19+
{
1920
InformationLeakageAcrossTrustBoundariesCQuery() {
2021
this = Declarations7Package::informationLeakageAcrossTrustBoundariesCQuery()
2122
}

c/cert/src/rules/ENV34-C/DoNotStorePointersReturnedByEnvironmentFunWarn.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import cpp
1616
import codingstandards.c.cert
1717
import codingstandards.cpp.rules.invalidatedenvstringpointerswarn.InvalidatedEnvStringPointersWarn
1818

19-
class DoNotStorePointersReturnedByEnvironmentFunWarnQuery extends InvalidatedEnvStringPointersWarnSharedQuery {
19+
class DoNotStorePointersReturnedByEnvironmentFunWarnQuery extends InvalidatedEnvStringPointersWarnSharedQuery
20+
{
2021
DoNotStorePointersReturnedByEnvironmentFunWarnQuery() {
2122
this = Contracts2Package::doNotStorePointersReturnedByEnvironmentFunWarnQuery()
2223
}

c/cert/src/rules/ERR30-C/FunctionCallBeforeErrnoCheck.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.c.Errno
17-
import semmle.code.cpp.dataflow.DataFlow
17+
import codingstandards.cpp.dataflow.DataFlow
1818

1919
/**
2020
* A call to an `OutOfBandErrnoSettingFunction`

c/cert/src/rules/ERR32-C/DoNotRelyOnIndeterminateValuesOfErrno.ql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import codingstandards.c.Errno
1616
import codingstandards.c.Signal
1717
import semmle.code.cpp.controlflow.Guards
1818

19-
2019
/**
2120
* A check on `signal` call return value
2221
* `if (signal(SIGINT, handler) == SIG_ERR)`

c/cert/src/rules/EXP30-C/DependenceOnOrderOfFunctionArgumentsForSideEffects.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.SideEffect
17-
import semmle.code.cpp.dataflow.DataFlow
18-
import semmle.code.cpp.dataflow.TaintTracking
17+
import codingstandards.cpp.dataflow.DataFlow
18+
import codingstandards.cpp.dataflow.TaintTracking
1919
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
2020

2121
/** Holds if the function's return value is derived from the `AliasParamter` p. */

c/cert/src/rules/EXP36-C/DoNotCastPointerToMoreStrictlyAlignedPointerType.ql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
import cpp
1515
import codingstandards.c.cert
1616
import codingstandards.cpp.Alignment
17-
import semmle.code.cpp.dataflow.DataFlow
18-
import semmle.code.cpp.dataflow.DataFlow2
17+
import codingstandards.cpp.dataflow.DataFlow
18+
import codingstandards.cpp.dataflow.DataFlow2
1919
import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
2020
import DataFlow::PathGraph
2121

@@ -118,7 +118,8 @@ class DefaultAlignedPointerExpr extends UnconvertedCastFromNonVoidPointerExpr, E
118118
* to exclude an `DefaultAlignedPointerAccessExpr` as a source if a preceding source
119119
* defined by this configuration provides more accurate alignment information.
120120
*/
121-
class AllocationOrAddressOfExprToUnconvertedCastFromNonVoidPointerExprConfig extends DataFlow2::Configuration {
121+
class AllocationOrAddressOfExprToUnconvertedCastFromNonVoidPointerExprConfig extends DataFlow2::Configuration
122+
{
122123
AllocationOrAddressOfExprToUnconvertedCastFromNonVoidPointerExprConfig() {
123124
this = "AllocationOrAddressOfExprToUnconvertedCastFromNonVoidPointerExprConfig"
124125
}

c/cert/src/rules/EXP37-C/DoNotCallFunctionPointerWithIncompatibleType.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
import cpp
1515
import codingstandards.c.cert
16-
import semmle.code.cpp.dataflow.DataFlow
16+
import codingstandards.cpp.dataflow.DataFlow
1717
import DataFlow::PathGraph
1818

1919
/**

0 commit comments

Comments
 (0)