Skip to content

Commit 40bea78

Browse files
committed
remove more instances of the alert-loc being repeated as a link
1 parent d55993a commit 40bea78

File tree

7 files changed

+52
-52
lines changed

7 files changed

+52
-52
lines changed

cpp/ql/src/Critical/MissingCheckScanf.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ where
117117
output.getCall() = call and
118118
output.hasGuardedAccess(access, false)
119119
select access,
120-
"$@, but may not have been written. " +
120+
"This variable is read, but may not have been written. " +
121121
"It should be guarded by a check that the $@ returns at least " +
122-
output.getMinimumGuardConstant() + ".", access,
123-
"The variable " + access.toString() + " is read", call, call.toString()
122+
output.getMinimumGuardConstant() + ".", call, call.toString()

cpp/ql/src/Likely Bugs/Leap Year/Adding365DaysPerYear.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ import LeapYear
1717
from Expr source, Expr sink, PossibleYearArithmeticOperationCheckConfiguration config
1818
where config.hasFlow(DataFlow::exprNode(source), DataFlow::exprNode(sink))
1919
select sink,
20-
"This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios.",
21-
source, source.toString(), sink, sink.toString()
20+
"An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios.",
21+
source, source.toString()

cpp/ql/src/Likely Bugs/Protocols/TlsSettingsMisconfiguration.ql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,6 @@ where
9292
isOptionSet(cc, BoostorgAsio::getShiftedSslOptionsNoTls1_2(), e) and
9393
msg = "no_tlsv1_2 was set"
9494
)
95-
select cc, "Usage of $@ with protocol $@ is not configured correctly: The option $@.", cc,
96-
"boost::asio::ssl::context::context", protocolSource, protocolSource.toString(), e, msg
95+
select cc,
96+
"This usage of 'boost::asio::ssl::context::context' with protocol $@ is not configured correctly: The option $@.",
97+
protocolSource, protocolSource.toString(), e, msg

cpp/ql/src/experimental/Security/CWE/CWE-787/UnsignedToSignedPointerArith.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ where
2626
DataFlow::localFlow(DataFlow::parameterNode(p), sink) and
2727
p.getUnspecifiedType().getSize() < 8
2828
select call,
29-
"This call: $@ passes an unsigned int to a function that requires a signed int: $@. And then used in pointer arithmetic: $@.",
30-
call, call.toString(), f, f.toString(), sink, sink.toString()
29+
"This call passes an unsigned int to a function that requires a signed int: $@. And then used in pointer arithmetic: $@.",
30+
f, f.toString(), sink, sink.toString()
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
| test.cpp:30:7:30:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:30:7:30:7 | i | The variable i is read | test.cpp:29:3:29:7 | call to scanf | call to scanf |
2-
| test.cpp:46:7:46:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:46:7:46:7 | i | The variable i is read | test.cpp:45:3:45:7 | call to scanf | call to scanf |
3-
| test.cpp:63:7:63:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:63:7:63:7 | i | The variable i is read | test.cpp:62:3:62:7 | call to scanf | call to scanf |
4-
| test.cpp:75:7:75:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:75:7:75:7 | i | The variable i is read | test.cpp:74:3:74:7 | call to scanf | call to scanf |
5-
| test.cpp:87:7:87:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:87:7:87:7 | i | The variable i is read | test.cpp:86:3:86:8 | call to fscanf | call to fscanf |
6-
| test.cpp:94:7:94:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:94:7:94:7 | i | The variable i is read | test.cpp:93:3:93:8 | call to sscanf | call to sscanf |
7-
| test.cpp:143:8:143:8 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:143:8:143:8 | i | The variable i is read | test.cpp:141:7:141:11 | call to scanf | call to scanf |
8-
| test.cpp:152:8:152:8 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:152:8:152:8 | i | The variable i is read | test.cpp:150:7:150:11 | call to scanf | call to scanf |
9-
| test.cpp:184:8:184:8 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:184:8:184:8 | i | The variable i is read | test.cpp:183:7:183:11 | call to scanf | call to scanf |
10-
| test.cpp:203:8:203:8 | j | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 2. | test.cpp:203:8:203:8 | j | The variable j is read | test.cpp:200:7:200:11 | call to scanf | call to scanf |
11-
| test.cpp:227:9:227:9 | d | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 2. | test.cpp:227:9:227:9 | d | The variable d is read | test.cpp:225:25:225:29 | call to scanf | call to scanf |
12-
| test.cpp:231:9:231:9 | d | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 2. | test.cpp:231:9:231:9 | d | The variable d is read | test.cpp:229:14:229:18 | call to scanf | call to scanf |
13-
| test.cpp:243:7:243:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:243:7:243:7 | i | The variable i is read | test.cpp:242:3:242:7 | call to scanf | call to scanf |
14-
| test.cpp:251:7:251:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:251:7:251:7 | i | The variable i is read | test.cpp:250:3:250:7 | call to scanf | call to scanf |
15-
| test.cpp:259:7:259:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:259:7:259:7 | i | The variable i is read | test.cpp:258:3:258:7 | call to scanf | call to scanf |
16-
| test.cpp:271:7:271:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:271:7:271:7 | i | The variable i is read | test.cpp:270:3:270:7 | call to scanf | call to scanf |
17-
| test.cpp:281:8:281:12 | ptr_i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:281:8:281:12 | ptr_i | The variable ptr_i is read | test.cpp:280:3:280:7 | call to scanf | call to scanf |
18-
| test.cpp:289:7:289:7 | i | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:289:7:289:7 | i | The variable i is read | test.cpp:288:3:288:7 | call to scanf | call to scanf |
19-
| test.cpp:383:25:383:25 | u | $@, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:383:25:383:25 | u | The variable u is read | test.cpp:382:6:382:11 | call to sscanf | call to sscanf |
1+
| test.cpp:30:7:30:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:29:3:29:7 | call to scanf | call to scanf |
2+
| test.cpp:46:7:46:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:45:3:45:7 | call to scanf | call to scanf |
3+
| test.cpp:63:7:63:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:62:3:62:7 | call to scanf | call to scanf |
4+
| test.cpp:75:7:75:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:74:3:74:7 | call to scanf | call to scanf |
5+
| test.cpp:87:7:87:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:86:3:86:8 | call to fscanf | call to fscanf |
6+
| test.cpp:94:7:94:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:93:3:93:8 | call to sscanf | call to sscanf |
7+
| test.cpp:143:8:143:8 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:141:7:141:11 | call to scanf | call to scanf |
8+
| test.cpp:152:8:152:8 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:150:7:150:11 | call to scanf | call to scanf |
9+
| test.cpp:184:8:184:8 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:183:7:183:11 | call to scanf | call to scanf |
10+
| test.cpp:203:8:203:8 | j | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 2. | test.cpp:200:7:200:11 | call to scanf | call to scanf |
11+
| test.cpp:227:9:227:9 | d | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 2. | test.cpp:225:25:225:29 | call to scanf | call to scanf |
12+
| test.cpp:231:9:231:9 | d | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 2. | test.cpp:229:14:229:18 | call to scanf | call to scanf |
13+
| test.cpp:243:7:243:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:242:3:242:7 | call to scanf | call to scanf |
14+
| test.cpp:251:7:251:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:250:3:250:7 | call to scanf | call to scanf |
15+
| test.cpp:259:7:259:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:258:3:258:7 | call to scanf | call to scanf |
16+
| test.cpp:271:7:271:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:270:3:270:7 | call to scanf | call to scanf |
17+
| test.cpp:281:8:281:12 | ptr_i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:280:3:280:7 | call to scanf | call to scanf |
18+
| test.cpp:289:7:289:7 | i | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:288:3:288:7 | call to scanf | call to scanf |
19+
| test.cpp:383:25:383:25 | u | This variable is read, but may not have been written. It should be guarded by a check that the $@ returns at least 1. | test.cpp:382:6:382:11 | call to sscanf | call to sscanf |
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
| test.cpp:173:2:173:52 | ... = ... | This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:170:2:170:47 | ... += ... | ... += ... | test.cpp:173:2:173:52 | ... = ... | ... = ... |
2-
| test.cpp:174:2:174:46 | ... = ... | This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:170:2:170:47 | ... += ... | ... += ... | test.cpp:174:2:174:46 | ... = ... | ... = ... |
3-
| test.cpp:193:2:193:24 | ... = ... | This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:193:2:193:24 | ... = ... | ... = ... | test.cpp:193:2:193:24 | ... = ... | ... = ... |
4-
| test.cpp:217:2:217:52 | ... = ... | This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:214:2:214:47 | ... += ... | ... += ... | test.cpp:217:2:217:52 | ... = ... | ... = ... |
5-
| test.cpp:218:2:218:46 | ... = ... | This arithmetic operation $@ uses a constant value of 365 ends up modifying the date/time located at $@, without considering leap year scenarios. | test.cpp:214:2:214:47 | ... += ... | ... += ... | test.cpp:218:2:218:46 | ... = ... | ... = ... |
1+
| test.cpp:173:2:173:52 | ... = ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:170:2:170:47 | ... += ... | ... += ... |
2+
| test.cpp:174:2:174:46 | ... = ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:170:2:170:47 | ... += ... | ... += ... |
3+
| test.cpp:193:2:193:24 | ... = ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:193:2:193:24 | ... = ... | ... = ... |
4+
| test.cpp:217:2:217:52 | ... = ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:214:2:214:47 | ... += ... | ... += ... |
5+
| test.cpp:218:2:218:46 | ... = ... | An arithmetic operation $@ that uses a constant value of 365 ends up modifying this date/time, without considering leap year scenarios. | test.cpp:214:2:214:47 | ... += ... | ... += ... |

0 commit comments

Comments
 (0)