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

Appearance settings

Commit af13e6f

Browse filesBrowse files
committed
Update metadata
1 parent 4b64086 commit af13e6f
Copy full SHA for af13e6f

File tree

Expand file treeCollapse file tree

4 files changed

+8
-6
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+8
-6
lines changed

‎c/cert/src/rules/ERR33-C/DetectAndHandleStandardLibraryErrors.md

Copy file name to clipboardExpand all lines: c/cert/src/rules/ERR33-C/DetectAndHandleStandardLibraryErrors.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ Independent( ERR33-C, POS54-C, FLP32-C, ERR34-C) Intersection( CWE-252, CWE-253)
372372

373373
## Implementation notes
374374

375-
None
375+
The rule is enforced in the context of a single function.
376376

377377
## References
378378

‎c/cert/test/rules/ERR33-C/test.c

Copy file name to clipboardExpand all lines: c/cert/test/rules/ERR33-C/test.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void f4() {
125125
if (strtoumax("", &endptr, 0) == UINTMAX_MAX) { // COMPLIANT
126126
}
127127
if (strtoull("", &endptr, 0) == ULONG_MAX) { // NON_COMPLIANT
128-
// =ULLONG_MAX not present in the test DB
128+
// =ULLONG_MAX not present in the test DB
129129
}
130130
if (strtoul("", &endptr, 0) == ULONG_MAX) { // COMPLIANT
131131
}

‎cpp/common/src/codingstandards/cpp/exclusions/c/Contracts5.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/exclusions/c/Contracts5.qll
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,24 @@ newtype Contracts5Query =
77
TDoNotRelyOnIndeterminateValuesOfErrnoQuery() or
88
TDetectAndHandleStandardLibraryErrorsQuery()
99

10-
predicate isContracts5QueryMetadata(Query query, string queryId, string ruleId) {
10+
predicate isContracts5QueryMetadata(Query query, string queryId, string ruleId, string category) {
1111
query =
1212
// `Query` instance for the `doNotRelyOnIndeterminateValuesOfErrno` query
1313
Contracts5Package::doNotRelyOnIndeterminateValuesOfErrnoQuery() and
1414
queryId =
1515
// `@id` for the `doNotRelyOnIndeterminateValuesOfErrno` query
1616
"c/cert/do-not-rely-on-indeterminate-values-of-errno" and
17-
ruleId = "ERR32-C"
17+
ruleId = "ERR32-C" and
18+
category = "rule"
1819
or
1920
query =
2021
// `Query` instance for the `detectAndHandleStandardLibraryErrors` query
2122
Contracts5Package::detectAndHandleStandardLibraryErrorsQuery() and
2223
queryId =
2324
// `@id` for the `detectAndHandleStandardLibraryErrors` query
2425
"c/cert/detect-and-handle-standard-library-errors" and
25-
ruleId = "ERR33-C"
26+
ruleId = "ERR33-C" and
27+
category = "rule"
2628
}
2729

2830
module Contracts5Package {

‎cpp/common/src/codingstandards/cpp/exclusions/c/RuleMetadata.qll

Copy file name to clipboardExpand all lines: cpp/common/src/codingstandards/cpp/exclusions/c/RuleMetadata.qll
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ predicate isQueryMetadata(Query query, string queryId, string ruleId, string cat
9090
isContracts2QueryMetadata(query, queryId, ruleId, category) or
9191
isContracts3QueryMetadata(query, queryId, ruleId, category) or
9292
isContracts4QueryMetadata(query, queryId, ruleId, category) or
93-
isContracts5QueryMetadata(query, queryId, ruleId) or
93+
isContracts5QueryMetadata(query, queryId, ruleId, category) or
9494
isDeclarations1QueryMetadata(query, queryId, ruleId, category) or
9595
isDeclarations2QueryMetadata(query, queryId, ruleId, category) or
9696
isDeclarations3QueryMetadata(query, queryId, ruleId, category) or

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.