Skip to content

Commit 3df1125

Browse files
authored
Merge pull request #924 from jketema/jketema/pvt
Make dataflow imports private in libraries and remove unused imports
2 parents 22c2da3 + 68355b0 commit 3df1125

File tree

34 files changed

+61
-52
lines changed

34 files changed

+61
-52
lines changed

c/cert/src/rules/ARR32-C/VariableLengthArraySizeNotInValidRange.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import cpp
2121
import codingstandards.c.cert
2222
import codingstandards.cpp.Overflow
23+
import semmle.code.cpp.dataflow.TaintTracking
2324

2425
/**
2526
* Gets the maximum size (in bytes) a variable-length array

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import codingstandards.c.cert
2020
import codingstandards.c.Errno
2121
import codingstandards.c.Signal
2222
import semmle.code.cpp.controlflow.Guards
23+
import semmle.code.cpp.dataflow.DataFlow
2324

2425
/**
2526
* A check on `signal` call return value

c/cert/src/rules/ERR33-C/DetectAndHandleStandardLibraryErrors.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import cpp
2020
import codingstandards.c.cert
2121
import semmle.code.cpp.commons.NULL
2222
import codingstandards.cpp.ReadErrorsAndEOF
23+
import semmle.code.cpp.dataflow.DataFlow
2324

2425
ComparisonOperation getAValidComparison(string spec) {
2526
spec = "=0" and result.(EqualityOperation).getAnOperand().getValue() = "0"

c/cert/src/rules/FIO40-C/ResetStringsOnFgetsOrFgetwsFailure.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import cpp
2121
import codingstandards.cpp.FgetsErrorManagement
2222
import codingstandards.cpp.Dereferenced
2323
import codingstandards.c.cert
24+
import semmle.code.cpp.dataflow.DataFlow
2425

2526
/*
2627
* Models calls to `memcpy` `strcpy` `strncpy` and their wrappers

c/cert/test/rules/ARR32-C/VariableLengthArraySizeNotInValidRange.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (VariableLengthArraySizeNotInValidRange.ql:109,11-19)
2-
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (VariableLengthArraySizeNotInValidRange.ql:92,5-18)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (VariableLengthArraySizeNotInValidRange.ql:110,11-19)
2+
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (VariableLengthArraySizeNotInValidRange.ql:93,5-18)
33
| test.c:14:8:14:8 | VLA declaration | Variable-length array dimension size may be in an invalid range. |
44
| test.c:15:8:15:8 | VLA declaration | Variable-length array dimension size may be in an invalid range. |
55
| test.c:16:8:16:8 | VLA declaration | Variable-length array dimension size may be in an invalid range. |

c/cert/test/rules/ERR32-C/DoNotRelyOnIndeterminateValuesOfErrno.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:55,7-15)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:55,27-35)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:56,9-17)
4-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:59,9-17)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:56,7-15)
2+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:56,27-35)
3+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:57,9-17)
4+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DoNotRelyOnIndeterminateValuesOfErrno.ql:60,9-17)
55
| test.c:12:5:12:10 | call to perror | `errno` has indeterminate value after this $@. | test.c:10:21:10:26 | call to signal | call to signal |
66
| test.c:30:5:30:10 | call to perror | `errno` has indeterminate value after this $@. | test.c:26:21:26:26 | call to signal | call to signal |
77
| test.c:49:5:49:10 | call to perror | `errno` has indeterminate value after this $@. | test.c:45:21:45:26 | call to signal | call to signal |

c/cert/test/rules/ERR33-C/DetectAndHandleStandardLibraryErrors.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DetectAndHandleStandardLibraryErrors.ql:458,5-13)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (DetectAndHandleStandardLibraryErrors.ql:459,5-13)
22
| test.c:18:3:18:11 | call to setlocale | Missing error detection for the call to function `setlocale`. |
33
| test.c:24:23:24:31 | call to setlocale | Missing error detection for the call to function `setlocale`. |
44
| test.c:29:22:29:27 | call to calloc | Missing error detection for the call to function `calloc`. |

c/cert/test/rules/FIO40-C/ResetStringsOnFgetsOrFgetwsFailure.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:47,11-19)
2-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:47,31-39)
3-
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:48,13-21)
1+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:48,11-19)
2+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:48,31-39)
3+
WARNING: module 'DataFlow' has been deprecated and may be removed in future (ResetStringsOnFgetsOrFgetwsFailure.ql:49,13-21)
44
| test.c:20:10:20:12 | buf | The buffer is not reset before being referenced following a failed $@. | test.c:15:7:15:11 | call to fgets | call to fgets |
55
| test.c:57:10:57:12 | buf | The buffer is not reset before being referenced following a failed $@. | test.c:52:7:52:11 | call to fgets | call to fgets |
66
| test.c:66:18:66:20 | buf | The buffer is not reset before being referenced following a failed $@. | test.c:61:7:61:11 | call to fgets | call to fgets |

c/common/src/codingstandards/c/OutOfBounds.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import codingstandards.cpp.Allocations
1111
import codingstandards.cpp.Overflow
1212
import codingstandards.cpp.PossiblyUnsafeStringOperation
1313
import codingstandards.cpp.SimpleRangeAnalysisCustomizations
14-
import semmle.code.cpp.dataflow.DataFlow
14+
private import semmle.code.cpp.dataflow.DataFlow
1515
import semmle.code.cpp.valuenumbering.GlobalValueNumbering
1616

1717
module OOB {

c/common/src/codingstandards/c/Signal.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import cpp
2-
import semmle.code.cpp.dataflow.DataFlow
2+
private import semmle.code.cpp.dataflow.DataFlow
33

44
/**
55
* A signal corresponding to a computational exception

0 commit comments

Comments
 (0)