Skip to content

Commit 227d6ff

Browse files
committed
Merge branch 'jhelie/add-xss-through-dom' of github.com:github/codeql into jhelie/add-xss-through-dom
2 parents 38430c5 + 98379d3 commit 227d6ff

File tree

422 files changed

+63014
-57915
lines changed

Some content is hidden

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

422 files changed

+63014
-57915
lines changed

.github/workflows/compile-queries.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,45 @@ name: "Compile all queries using the latest stable CodeQL CLI"
22

33
on:
44
push:
5-
branches: [main] # makes sure the cache gets populated
6-
pull_request:
7-
branches:
5+
branches: # makes sure the cache gets populated - running on the branches people tend to merge into.
86
- main
97
- "rc/*"
8+
- "codeql-cli-*"
9+
pull_request:
1010

1111
jobs:
1212
compile-queries:
1313
runs-on: ubuntu-latest-xl
1414

1515
steps:
1616
- uses: actions/checkout@v3
17-
with:
18-
fetch-depth: 0
1917
# calculate the merge-base with main, in a way that works both on PRs and pushes to main.
2018
- name: Calculate merge-base
2119
if: ${{ github.event_name == 'pull_request' }}
2220
env:
2321
BASE_BRANCH: ${{ github.base_ref }}
2422
run: |
25-
MERGE_BASE=$(git merge-base --fork-point origin/$BASE_BRANCH)
26-
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
27-
- name: Calculate merge-base - branch
28-
if: ${{ github.event_name != 'pull_request' }}
29-
# using github.sha instead, since we're directly on a branch, and not in a PR
30-
run: |
31-
MERGE_BASE=${{ github.sha }}
23+
MERGE_BASE=$(git cat-file commit $GITHUB_SHA | grep '^parent ' | head -1 | cut -f 2 -d " ")
3224
echo "merge-base=$MERGE_BASE" >> $GITHUB_ENV
33-
- name: Cache CodeQL query compilation
25+
- name: Read CodeQL query compilation - PR
26+
if: ${{ github.event_name == 'pull_request' }}
3427
uses: actions/cache@v3
3528
with:
3629
path: '*/ql/src/.cache'
37-
# current GH HEAD first, merge-base second, generic third
38-
key: codeql-stable-compile-${{ github.sha }}
30+
key: codeql-compile-pr-${{ github.sha }} # deliberately not using the `compile-compile-main` keys here.
3931
restore-keys: |
40-
codeql-stable-compile-${{ env.merge-base }}
41-
codeql-stable-compile-
32+
codeql-compile-${{ github.base_ref }}-${{ env.merge-base }}
33+
codeql-compile-${{ github.base_ref }}-
34+
codeql-compile-main-
35+
- name: Fill CodeQL query compilation cache - main
36+
if: ${{ github.event_name != 'pull_request' }}
37+
uses: actions/cache@v3
38+
with:
39+
path: '*/ql/src/.cache'
40+
key: codeql-compile-${{ github.ref_name }}-${{ github.sha }} # just fill on main
41+
restore-keys: | # restore from another random commit, to speed up compilation.
42+
codeql-compile-${{ github.ref_name }}-
43+
codeql-compile-main-
4244
- name: Setup CodeQL
4345
uses: ./.github/actions/fetch-codeql
4446
with:

.github/workflows/ql-for-ql-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
- uses: actions/checkout@v3
2525
- name: Find codeql
2626
id: find-codeql
27-
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
27+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
2828
with:
2929
languages: javascript # does not matter
3030
- name: Get CodeQL version
3131
id: get-codeql-version
3232
run: |
33-
echo "::set-output name=version::$("${CODEQL}" --version | head -n 1 | rev | cut -d " " -f 1 | rev)"
33+
echo "version=$("${CODEQL}" --version | head -n 1 | rev | cut -d " " -f 1 | rev)" >> $GITHUB_OUTPUT
3434
shell: bash
3535
env:
3636
CODEQL: ${{ steps.find-codeql.outputs.codeql-path }}
@@ -133,7 +133,7 @@ jobs:
133133
env:
134134
CONF: ./ql-for-ql-config.yml
135135
- name: Initialize CodeQL
136-
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
136+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
137137
with:
138138
languages: ql
139139
db-location: ${{ runner.temp }}/db
@@ -145,7 +145,7 @@ jobs:
145145
PACK: ${{ runner.temp }}/pack
146146

147147
- name: Perform CodeQL Analysis
148-
uses: github/codeql-action/analyze@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
148+
uses: github/codeql-action/analyze@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
149149
with:
150150
category: "ql-for-ql"
151151
- name: Copy sarif file to CWD

.github/workflows/ql-for-ql-dataset_measure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Find codeql
2727
id: find-codeql
28-
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
28+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
2929
with:
3030
languages: javascript # does not matter
3131
- uses: actions/cache@v3

.github/workflows/ql-for-ql-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- name: Find codeql
2424
id: find-codeql
25-
uses: github/codeql-action/init@71a8b35ff4c80fcfcd05bc1cd932fe3c08f943ca
25+
uses: github/codeql-action/init@77a8d2d10c0b403a8b4aadbd223dc489ecd22683
2626
with:
2727
languages: javascript # does not matter
2828
- uses: actions/cache@v3

.github/workflows/swift.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ jobs:
5151
- uses: actions/checkout@v3
5252
- uses: ./swift/actions/create-extractor-pack
5353
- uses: ./swift/actions/run-quick-tests
54+
- uses: ./swift/actions/print-unextracted
5455
build-and-test-linux:
5556
runs-on: ubuntu-20.04
5657
steps:
5758
- uses: actions/checkout@v3
5859
- uses: ./swift/actions/create-extractor-pack
5960
- uses: ./swift/actions/run-quick-tests
61+
- uses: ./swift/actions/print-unextracted
6062
qltests-linux:
6163
needs: build-and-test-linux
6264
runs-on: ubuntu-latest

cpp/ql/lib/semmle/code/cpp/models/implementations/Strcat.qll

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,18 @@ class StrcatFunction extends TaintFunction, DataFlowFunction, ArrayFunction, Sid
5050
}
5151

5252
override predicate hasTaintFlow(FunctionInput input, FunctionOutput output) {
53-
this.getName() = ["strncat", "wcsncat", "_mbsncat", "_mbsncat_l"] and
54-
input.isParameter(2) and
55-
output.isParameterDeref(0)
56-
or
57-
this.getName() = ["_mbsncat_l", "_mbsnbcat_l"] and
58-
input.isParameter(3) and
59-
output.isParameterDeref(0)
60-
or
61-
input.isParameterDeref(0) and
62-
output.isParameterDeref(0)
63-
or
64-
input.isParameterDeref(1) and
65-
output.isParameterDeref(0)
53+
(
54+
this.getName() = ["strncat", "wcsncat", "_mbsncat", "_mbsncat_l"] and
55+
input.isParameter(2)
56+
or
57+
this.getName() = ["_mbsncat_l", "_mbsnbcat_l"] and
58+
input.isParameter(3)
59+
or
60+
input.isParameterDeref(0)
61+
or
62+
input.isParameterDeref(1)
63+
) and
64+
(output.isParameterDeref(0) or output.isReturnValueDeref())
6665
}
6766

6867
override predicate hasArrayInput(int param) {

cpp/ql/src/Likely Bugs/Format/TooManyFormatArguments.ql

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@
1313

1414
import cpp
1515

16-
from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given
16+
from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given, string ffcName
1717
where
1818
ffc = fl.getUse() and
1919
expected = fl.getNumArgNeeded() and
2020
given = ffc.getNumFormatArgument() and
2121
expected < given and
22-
fl.specsAreKnown()
23-
select ffc, "Format expects " + expected.toString() + " arguments but given " + given.toString()
22+
fl.specsAreKnown() and
23+
(
24+
if ffc.isInMacroExpansion()
25+
then ffcName = ffc.getTarget().getName() + " (in a macro expansion)"
26+
else ffcName = ffc.getTarget().getName()
27+
)
28+
select ffc,
29+
"Format for " + ffcName + " expects " + expected.toString() + " arguments but given " +
30+
given.toString()

cpp/ql/src/Likely Bugs/Format/WrongNumberOfFormatArguments.ql

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,18 @@
1616

1717
import cpp
1818

19-
from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given
19+
from FormatLiteral fl, FormattingFunctionCall ffc, int expected, int given, string ffcName
2020
where
2121
ffc = fl.getUse() and
2222
expected = fl.getNumArgNeeded() and
2323
given = ffc.getNumFormatArgument() and
2424
expected > given and
25-
fl.specsAreKnown()
26-
select ffc, "Format expects " + expected.toString() + " arguments but given " + given.toString()
25+
fl.specsAreKnown() and
26+
(
27+
if ffc.isInMacroExpansion()
28+
then ffcName = ffc.getTarget().getName() + " (in a macro expansion)"
29+
else ffcName = ffc.getTarget().getName()
30+
)
31+
select ffc,
32+
"Format for " + ffcName + " expects " + expected.toString() + " arguments but given " +
33+
given.toString()

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-consistency.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,7 @@ postWithInFlow
8787
| test.cpp:465:3:465:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
8888
| test.cpp:465:4:465:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
8989
| test.cpp:470:22:470:22 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
90+
| test.cpp:499:3:499:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
91+
| test.cpp:499:4:499:4 | p [inner post update] | PostUpdateNode should not be the target of local flow. |
92+
| test.cpp:505:35:505:35 | x [inner post update] | PostUpdateNode should not be the target of local flow. |
9093
viableImplInCallContextTooLarge

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,13 @@ postWithInFlow
582582
| test.cpp:489:7:489:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
583583
| test.cpp:491:5:491:5 | x [post update] | PostUpdateNode should not be the target of local flow. |
584584
| test.cpp:494:5:494:5 | x [post update] | PostUpdateNode should not be the target of local flow. |
585+
| test.cpp:499:3:499:4 | * ... [post update] | PostUpdateNode should not be the target of local flow. |
586+
| test.cpp:499:4:499:4 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
587+
| test.cpp:499:4:499:4 | p [post update] | PostUpdateNode should not be the target of local flow. |
588+
| test.cpp:504:7:504:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
589+
| test.cpp:505:34:505:35 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
590+
| test.cpp:505:34:505:35 | & ... [post update] | PostUpdateNode should not be the target of local flow. |
591+
| test.cpp:505:35:505:35 | x [post update] | PostUpdateNode should not be the target of local flow. |
585592
| true_upon_entry.cpp:9:7:9:7 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
586593
| true_upon_entry.cpp:10:12:10:12 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |
587594
| true_upon_entry.cpp:10:27:10:27 | VariableAddress [post update] | PostUpdateNode should not be the target of local flow. |

cpp/ql/test/library-tests/dataflow/dataflow-tests/test.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,3 +494,14 @@ void regression_with_phi_flow(int clean1) {
494494
x = source();
495495
}
496496
}
497+
498+
int intOutparamSourceMissingReturn(int *p) {
499+
*p = source();
500+
// return deliberately omitted to test IR dataflow behavior
501+
}
502+
503+
void viaOutparamMissingReturn() {
504+
int x = 0;
505+
intOutparamSourceMissingReturn(&x);
506+
sink(x); // $ ast,ir
507+
}

cpp/ql/test/library-tests/dataflow/taint-tests/localTaint.expected

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5964,6 +5964,7 @@
59645964
| taint.cpp:172:10:172:15 | buffer | taint.cpp:172:3:172:8 | call to strcat | |
59655965
| taint.cpp:172:10:172:15 | buffer | taint.cpp:172:10:172:15 | ref arg buffer | TAINT |
59665966
| taint.cpp:172:10:172:15 | ref arg buffer | taint.cpp:173:8:173:13 | buffer | |
5967+
| taint.cpp:172:18:172:24 | tainted | taint.cpp:172:3:172:8 | call to strcat | TAINT |
59675968
| taint.cpp:172:18:172:24 | tainted | taint.cpp:172:10:172:15 | ref arg buffer | TAINT |
59685969
| taint.cpp:180:19:180:19 | p | taint.cpp:180:19:180:19 | p | |
59695970
| taint.cpp:180:19:180:19 | p | taint.cpp:181:9:181:9 | p | |
@@ -6373,12 +6374,14 @@
63736374
| taint.cpp:561:9:561:13 | dest1 | taint.cpp:561:9:561:13 | ref arg dest1 | TAINT |
63746375
| taint.cpp:561:9:561:13 | ref arg dest1 | taint.cpp:560:24:560:28 | dest1 | |
63756376
| taint.cpp:561:9:561:13 | ref arg dest1 | taint.cpp:562:7:562:11 | dest1 | |
6377+
| taint.cpp:561:16:561:21 | source | taint.cpp:561:2:561:7 | call to strcat | TAINT |
63766378
| taint.cpp:561:16:561:21 | source | taint.cpp:561:9:561:13 | ref arg dest1 | TAINT |
63776379
| taint.cpp:562:7:562:11 | ref arg dest1 | taint.cpp:560:24:560:28 | dest1 | |
63786380
| taint.cpp:564:9:564:13 | dest2 | taint.cpp:564:2:564:7 | call to strcat | |
63796381
| taint.cpp:564:9:564:13 | dest2 | taint.cpp:564:9:564:13 | ref arg dest2 | TAINT |
63806382
| taint.cpp:564:9:564:13 | ref arg dest2 | taint.cpp:560:37:560:41 | dest2 | |
63816383
| taint.cpp:564:9:564:13 | ref arg dest2 | taint.cpp:565:7:565:11 | dest2 | |
6384+
| taint.cpp:564:16:564:20 | clean | taint.cpp:564:2:564:7 | call to strcat | TAINT |
63826385
| taint.cpp:564:16:564:20 | clean | taint.cpp:564:9:564:13 | ref arg dest2 | TAINT |
63836386
| taint.cpp:565:7:565:11 | ref arg dest2 | taint.cpp:560:37:560:41 | dest2 | |
63846387
| taint.cpp:572:37:572:41 | dest1 | taint.cpp:572:37:572:41 | dest1 | |
@@ -6405,9 +6408,12 @@
64056408
| taint.cpp:574:36:574:40 | ref arg dest1 | taint.cpp:572:37:572:41 | dest1 | |
64066409
| taint.cpp:574:36:574:40 | ref arg dest1 | taint.cpp:575:7:575:11 | dest1 | |
64076410
| taint.cpp:574:36:574:40 | ref arg dest1 | taint.cpp:576:8:576:12 | dest1 | |
6411+
| taint.cpp:574:43:574:45 | ptr | taint.cpp:574:25:574:34 | call to _mbsncat_l | TAINT |
64086412
| taint.cpp:574:43:574:45 | ptr | taint.cpp:574:36:574:40 | ref arg dest1 | TAINT |
6413+
| taint.cpp:574:48:574:48 | n | taint.cpp:574:25:574:34 | call to _mbsncat_l | TAINT |
64096414
| taint.cpp:574:48:574:48 | n | taint.cpp:574:36:574:40 | ref arg dest1 | TAINT |
64106415
| taint.cpp:574:51:574:56 | ref arg source | taint.cpp:573:49:573:54 | source | |
6416+
| taint.cpp:574:51:574:56 | source | taint.cpp:574:25:574:34 | call to _mbsncat_l | TAINT |
64116417
| taint.cpp:574:51:574:56 | source | taint.cpp:574:36:574:40 | ref arg dest1 | TAINT |
64126418
| taint.cpp:575:7:575:11 | ref arg dest1 | taint.cpp:572:37:572:41 | dest1 | |
64136419
| taint.cpp:575:7:575:11 | ref arg dest1 | taint.cpp:576:8:576:12 | dest1 | |
@@ -6421,8 +6427,11 @@
64216427
| taint.cpp:580:36:580:40 | ref arg dest3 | taint.cpp:572:85:572:89 | dest3 | |
64226428
| taint.cpp:580:36:580:40 | ref arg dest3 | taint.cpp:581:7:581:11 | dest3 | |
64236429
| taint.cpp:580:36:580:40 | ref arg dest3 | taint.cpp:582:8:582:12 | dest3 | |
6430+
| taint.cpp:580:43:580:45 | ptr | taint.cpp:580:25:580:34 | call to _mbsncat_l | TAINT |
64246431
| taint.cpp:580:43:580:45 | ptr | taint.cpp:580:36:580:40 | ref arg dest3 | TAINT |
6432+
| taint.cpp:580:48:580:48 | n | taint.cpp:580:25:580:34 | call to _mbsncat_l | TAINT |
64256433
| taint.cpp:580:48:580:48 | n | taint.cpp:580:36:580:40 | ref arg dest3 | TAINT |
6434+
| taint.cpp:580:51:580:55 | clean | taint.cpp:580:25:580:34 | call to _mbsncat_l | TAINT |
64266435
| taint.cpp:580:51:580:55 | clean | taint.cpp:580:36:580:40 | ref arg dest3 | TAINT |
64276436
| taint.cpp:580:51:580:55 | ref arg clean | taint.cpp:573:32:573:36 | clean | |
64286437
| taint.cpp:581:7:581:11 | ref arg dest3 | taint.cpp:572:85:572:89 | dest3 | |

cpp/ql/test/library-tests/dataflow/taint-tests/taint.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,8 @@ void test__mbsncat_l(unsigned char* dest1, unsigned const char* ptr, unsigned ch
574574
unsigned char* dest2 = _mbsncat_l(dest1, ptr, n, source);
575575
sink(dest1); // $ SPURIOUS: ast,ir
576576
sink(*dest1); // $ ast,ir
577-
sink(dest2); // $ SPURIOUS: ir
578-
sink(*dest2); // $ ir
577+
sink(dest2); // $ SPURIOUS: ast,ir
578+
sink(*dest2); // $ ast,ir
579579

580580
unsigned char* dest4 = _mbsncat_l(dest3, ptr, n, clean);
581581
sink(dest3);

cpp/ql/test/library-tests/dataflow/taint-tests/taint.ql

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,7 @@ module IRTest {
9595
override predicate isSink(DataFlow::Node sink) {
9696
exists(FunctionCall call |
9797
call.getTarget().getName() = "sink" and
98-
sink.asConvertedExpr() = call.getAnArgument()
99-
or
100-
call.getTarget().getName() = "sink" and
101-
sink.asExpr() = call.getAnArgument() and
102-
sink.asConvertedExpr() instanceof ReferenceDereferenceExpr
103-
)
104-
or
105-
exists(ReadSideEffectInstruction read |
106-
read.getSideEffectOperand() = sink.asOperand() and
107-
read.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().hasName("sink")
98+
sink.asExpr() = call.getAnArgument()
10899
)
109100
}
110101

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
| a.c:18:3:18:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 2 |
2-
| b.c:15:3:15:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 2 |
3-
| c.c:7:3:7:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 2 |
4-
| custom_printf.cpp:31:5:31:12 | call to myPrintf | Format expects 2 arguments but given 3 |
5-
| macros.cpp:12:2:12:31 | call to printf | Format expects 2 arguments but given 3 |
6-
| macros.cpp:16:2:16:30 | call to printf | Format expects 2 arguments but given 3 |
7-
| test.c:7:2:7:7 | call to printf | Format expects 0 arguments but given 1 |
8-
| test.c:21:2:21:7 | call to printf | Format expects 2 arguments but given 3 |
9-
| test.c:27:3:27:8 | call to printf | Format expects 2 arguments but given 3 |
10-
| test.c:31:3:31:8 | call to printf | Format expects 1 arguments but given 3 |
11-
| test.c:32:3:32:8 | call to printf | Format expects 1 arguments but given 2 |
12-
| test.c:39:3:39:8 | call to printf | Format expects 2 arguments but given 5 |
13-
| test.c:40:3:40:8 | call to printf | Format expects 2 arguments but given 4 |
14-
| test.c:41:3:41:8 | call to printf | Format expects 2 arguments but given 3 |
1+
| a.c:18:3:18:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 2 |
2+
| b.c:15:3:15:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 2 |
3+
| c.c:7:3:7:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 2 |
4+
| custom_printf.cpp:31:5:31:12 | call to myPrintf | Format for myPrintf expects 2 arguments but given 3 |
5+
| macros.cpp:12:2:12:31 | call to printf | Format for printf (in a macro expansion) expects 2 arguments but given 3 |
6+
| macros.cpp:16:2:16:30 | call to printf | Format for printf (in a macro expansion) expects 2 arguments but given 3 |
7+
| test.c:7:2:7:7 | call to printf | Format for printf expects 0 arguments but given 1 |
8+
| test.c:21:2:21:7 | call to printf | Format for printf expects 2 arguments but given 3 |
9+
| test.c:27:3:27:8 | call to printf | Format for printf expects 2 arguments but given 3 |
10+
| test.c:31:3:31:8 | call to printf | Format for printf expects 1 arguments but given 3 |
11+
| test.c:32:3:32:8 | call to printf | Format for printf expects 1 arguments but given 2 |
12+
| test.c:39:3:39:8 | call to printf | Format for printf expects 2 arguments but given 5 |
13+
| test.c:40:3:40:8 | call to printf | Format for printf expects 2 arguments but given 4 |
14+
| test.c:41:3:41:8 | call to printf | Format for printf expects 2 arguments but given 3 |
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
| a.c:16:3:16:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 0 |
2-
| b.c:13:3:13:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 0 |
3-
| c.c:5:3:5:25 | call to myMultiplyDefinedPrintf | Format expects 1 arguments but given 0 |
4-
| custom_printf.cpp:29:5:29:12 | call to myPrintf | Format expects 2 arguments but given 1 |
5-
| macros.cpp:14:2:14:37 | call to printf | Format expects 4 arguments but given 3 |
6-
| macros.cpp:21:2:21:36 | call to printf | Format expects 4 arguments but given 3 |
7-
| test.c:9:2:9:7 | call to printf | Format expects 1 arguments but given 0 |
8-
| test.c:12:2:12:7 | call to printf | Format expects 2 arguments but given 1 |
9-
| test.c:15:2:15:7 | call to printf | Format expects 3 arguments but given 2 |
10-
| test.c:19:2:19:7 | call to printf | Format expects 2 arguments but given 1 |
11-
| test.c:29:3:29:8 | call to printf | Format expects 2 arguments but given 1 |
1+
| a.c:16:3:16:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 0 |
2+
| b.c:13:3:13:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 0 |
3+
| c.c:5:3:5:25 | call to myMultiplyDefinedPrintf | Format for myMultiplyDefinedPrintf expects 1 arguments but given 0 |
4+
| custom_printf.cpp:29:5:29:12 | call to myPrintf | Format for myPrintf expects 2 arguments but given 1 |
5+
| macros.cpp:14:2:14:37 | call to printf | Format for printf (in a macro expansion) expects 4 arguments but given 3 |
6+
| macros.cpp:21:2:21:36 | call to printf | Format for printf (in a macro expansion) expects 4 arguments but given 3 |
7+
| macros.cpp:32:2:32:25 | call to printf | Format for printf (in a macro expansion) expects 1 arguments but given 0 |
8+
| test.c:9:2:9:7 | call to printf | Format for printf expects 1 arguments but given 0 |
9+
| test.c:12:2:12:7 | call to printf | Format for printf expects 2 arguments but given 1 |
10+
| test.c:15:2:15:7 | call to printf | Format for printf expects 3 arguments but given 2 |
11+
| test.c:19:2:19:7 | call to printf | Format for printf expects 2 arguments but given 1 |
12+
| test.c:29:3:29:8 | call to printf | Format for printf expects 2 arguments but given 1 |

0 commit comments

Comments
 (0)