Skip to content

Commit 55a5dea

Browse files
authored
Merge branch 'main' into dependabot/pip/scripts/gitpython-3.1.35
2 parents 0be7d21 + e786157 commit 55a5dea

File tree

327 files changed

+763
-527
lines changed

Some content is hidden

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

327 files changed

+763
-527
lines changed

.github/workflows/upgrade_codeql_dependencies.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212
XARGS_MAX_PROCS: 4
1313

1414
jobs:
15-
say_hello:
15+
upgrade_codeql_dependencies:
1616
env:
1717
CODEQL_CLI_VERSION: ${{ github.event.inputs.codeql_cli_version }}
1818
runs-on: ubuntu-22.04
@@ -33,26 +33,29 @@ jobs:
3333
GITHUB_TOKEN: ${{ github.token }}
3434
CODEQL_CLI_VERSION: ${{ github.event.inputs.codeql_cli_version }}
3535
run: |
36-
scripts/upgrade-codeql-dependencies/upgrade_codeql_dependencies.py --cli-version "$CODEQL_CLI_VERSION"
36+
python3 scripts/upgrade-codeql-dependencies/upgrade-codeql-dependencies.py --cli-version "$CODEQL_CLI_VERSION"
3737
3838
- name: Fetch CodeQL
3939
env:
4040
GITHUB_TOKEN: ${{ github.token }}
41+
RUNNER_TEMP: ${{ runner.temp }}
4142
run: |
43+
cd $RUNNER_TEMP
4244
gh release download "v${CODEQL_CLI_VERSION}" --repo https://github.com/github/codeql-cli-binaries --pattern codeql-linux64.zip
4345
unzip -q codeql-linux64.zip
4446
4547
- name: Update CodeQL formatting based on new CLI version
48+
env:
49+
RUNNER_TEMP: ${{ runner.temp }}
4650
run: |
47-
find cpp -name '*.ql' -or -name '*.qll' | xargs --max-procs "$XARGS_MAX_PROCS" --max-args 1 codeql/codeql query format --in-place
48-
find c -name '*.ql' -or -name '*.qll' | xargs --max-procs "$XARGS_MAX_PROCS" --max-args 1 codeql/codeql query format --in-place
51+
find cpp \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place
52+
find c \( -name '*.ql' -or -name '*.qll' \) -print0 | xargs -0 --max-procs "$XARGS_MAX_PROCS" $RUNNER_TEMP/codeql/codeql query format --in-place
4953
5054
- name: Create Pull Request
5155
uses: peter-evans/create-pull-request@v3
5256
with:
53-
title: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_standard_library_commit }}"
54-
body: "This PR upgrades the CodeQL CLI version to ${{ github.event.inputs.codeql_cli_version }} and the `github/codeql` version to ${{ github.event.inputs.codeql_standard_library_commit }}."
55-
commit-message: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_standard_library_commit }}"
56-
team-reviewers: github/codeql-coding-standards
57+
title: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}"
58+
body: "This PR upgrades the CodeQL CLI version to ${{ github.event.inputs.codeql_cli_version }}."
59+
commit-message: "Upgrading `github/codeql` dependency to ${{ github.event.inputs.codeql_cli_version }}"
5760
delete-branch: true
5861
branch: "codeql/upgrade-to-${{ github.event.inputs.codeql_cli_version }}"

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
lockVersion: 1.0.0
33
dependencies:
44
codeql/cpp-all:
5-
version: 0.6.1
5+
version: 0.7.4
66
codeql/ssa:
7-
version: 0.0.14
7+
version: 0.0.19
88
codeql/tutorial:
9-
version: 0.0.7
9+
version: 0.0.12
10+
codeql/util:
11+
version: 0.0.12
1012
compiled: false

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.7.4

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/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/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/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/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/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/EXP36-C/DoNotCastPointerToMoreStrictlyAlignedPointerType.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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/EXP39-C/DoNotAccessVariableViaPointerOfIncompatibleType.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ Type compatibleTypes(Type type) {
163163
(
164164
type.stripType() instanceof Struct and
165165
type.getUnspecifiedType() = result.getUnspecifiedType() and
166-
not type.getName() = "struct <unnamed>" and
167-
not result.getName() = "struct <unnamed>"
166+
not type.(Struct).isAnonymous() and
167+
not result.(Struct).isAnonymous()
168168
or
169169
not type.stripType() instanceof Struct and
170170
(

c/cert/src/rules/EXP42-C/DoNotComparePaddingData.ql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ import codingstandards.c.cert
1515
import codingstandards.cpp.rules.memcmpusedtocomparepaddingdata.MemcmpUsedToComparePaddingData
1616

1717
class DoNotComparePaddingDataQuery extends MemcmpUsedToComparePaddingDataSharedQuery {
18-
DoNotComparePaddingDataQuery() {
19-
this = Memory2Package::doNotComparePaddingDataQuery()
20-
}
18+
DoNotComparePaddingDataQuery() { this = Memory2Package::doNotComparePaddingDataQuery() }
2119
}

c/cert/src/rules/FIO32-C/DoNotPerformFileOperationsOnDevices.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module TaintedPathConfiguration implements DataFlow::ConfigSig {
8989
}
9090
}
9191

92-
module TaintedPath = TaintTracking::Make<TaintedPathConfiguration>;
92+
module TaintedPath = TaintTracking::Global<TaintedPathConfiguration>;
9393

9494
from
9595
FileFunction fileFunction, Expr taintedArg, FlowSource taintSource,
@@ -98,7 +98,7 @@ where
9898
not isExcluded(taintedArg, IO3Package::doNotPerformFileOperationsOnDevicesQuery()) and
9999
taintedArg = sinkNode.getNode().asIndirectArgument() and
100100
fileFunction.outermostWrapperFunctionCall(taintedArg, callChain) and
101-
TaintedPath::hasFlowPath(sourceNode, sinkNode) and
101+
TaintedPath::flowPath(sourceNode, sinkNode) and
102102
taintSource = sourceNode.getNode()
103103
select taintedArg, sourceNode, sinkNode,
104104
"This argument to a file access function is derived from $@ and then passed to " + callChain + ".",

c/cert/src/rules/FIO39-C/DoNotAlternatelyIOFromAStreamWithoutPositioning.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.iofstreammissingpositioning.IOFstreamMissingPositioning
1717

18-
class DoNotAlternatelyIOFromAStreamWithoutPositioningQuery extends IOFstreamMissingPositioningSharedQuery {
18+
class DoNotAlternatelyIOFromAStreamWithoutPositioningQuery extends IOFstreamMissingPositioningSharedQuery
19+
{
1920
DoNotAlternatelyIOFromAStreamWithoutPositioningQuery() {
2021
this = IO1Package::doNotAlternatelyIOFromAStreamWithoutPositioningQuery()
2122
}

c/cert/src/rules/FIO42-C/CloseFilesWhenTheyAreNoLongerNeeded.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.closefilehandlewhennolongerneededshared.CloseFileHandleWhenNoLongerNeededShared
1818

19-
class CloseFilesWhenTheyAreNoLongerNeededQuery extends CloseFileHandleWhenNoLongerNeededSharedSharedQuery {
19+
class CloseFilesWhenTheyAreNoLongerNeededQuery extends CloseFileHandleWhenNoLongerNeededSharedSharedQuery
20+
{
2021
CloseFilesWhenTheyAreNoLongerNeededQuery() {
2122
this = IO1Package::closeFilesWhenTheyAreNoLongerNeededQuery()
2223
}

c/cert/src/rules/MEM34-C/OnlyFreeMemoryAllocatedDynamicallyCert.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.onlyfreememoryallocateddynamicallyshared.OnlyFreeMemoryAllocatedDynamicallyShared
1818

19-
class OnlyFreeMemoryAllocatedDynamicallyCertQuery extends OnlyFreeMemoryAllocatedDynamicallySharedSharedQuery {
19+
class OnlyFreeMemoryAllocatedDynamicallyCertQuery extends OnlyFreeMemoryAllocatedDynamicallySharedSharedQuery
20+
{
2021
OnlyFreeMemoryAllocatedDynamicallyCertQuery() {
2122
this = Memory2Package::onlyFreeMemoryAllocatedDynamicallyCertQuery()
2223
}

c/cert/src/rules/MSC30-C/RandUsedForGeneratingPseudorandomNumbers.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ import cpp
1414
import codingstandards.c.cert
1515
import codingstandards.cpp.rules.donotuserandforgeneratingpseudorandomnumbers.DoNotUseRandForGeneratingPseudorandomNumbers
1616

17-
class RandUsedForGeneratingPseudorandomNumbersQuery extends DoNotUseRandForGeneratingPseudorandomNumbersSharedQuery {
17+
class RandUsedForGeneratingPseudorandomNumbersQuery extends DoNotUseRandForGeneratingPseudorandomNumbersSharedQuery
18+
{
1819
RandUsedForGeneratingPseudorandomNumbersQuery() {
1920
this = MiscPackage::randUsedForGeneratingPseudorandomNumbersQuery()
2021
}

0 commit comments

Comments
 (0)