Skip to content

Commit ec7ce85

Browse files
committed
csparser: blacklist function_annotation for key event
1 parent e3e4b53 commit ec7ce85

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

csparser.cc

+1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ KeyEventDigger::KeyEventDigger():
275275
d->blackList.insert("example_access");
276276
d->blackList.insert("example_comparison");
277277
d->blackList.insert("example_lock");
278+
d->blackList.insert("function_annotation");
278279
d->blackList.insert("remediation");
279280
d->blackList.insert("rounding_remediation");
280281

tests/csgrep/44-csparser-new-key-evts-stdin.txt

+5
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,8 @@ apache-tomcat-9.0.7.redhat-10-src/java/org/apache/tomcat/websocket/WsFrameBase.j
122122
apache-tomcat-9.0.7.redhat-10-src/java/org/apache/tomcat/websocket/WsFrameBase.java:951: intervening_update: Another thread writes to "payloadWritten".
123123
apache-tomcat-9.0.7.redhat-10-src/java/org/apache/tomcat/websocket/WsFrameBase.java:951: stale_update: Updating "payloadWritten" based on a stale value. Any intervening update in another thread is overwritten.
124124
apache-tomcat-9.0.7.redhat-10-src/java/org/apache/tomcat/websocket/WsFrameBase.java:953: example_comparison: Example 1: Example comparison of "payloadWritten" to value, suggesting a semantically meaningful use.
125+
126+
Error: BAD_FREE (CWE-763):
127+
bind-9.11.3/lib/isc-pkcs11/mem.c:1592: address_assign: Assigning: "si" = "&(size_info *)ptr[-2]".
128+
bind-9.11.3/lib/isc-pkcs11/mem.c:1608: incorrect_free: "mem_put" frees incorrect pointer "si".
129+
bind-9.11.3/lib/isc-pkcs11/mem.c:804:1: function_annotation: Applying function annotation "free" to all paths.

tests/csgrep/44-csparser-new-key-evts-stdout.txt

+3
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ webrtc-audio-processing-0.3/webrtc/modules/audio_processing/beamformer/nonlinear
5454

5555
Error: VOLATILE_ATOMICITY:
5656
apache-tomcat-9.0.7.redhat-10-src/java/org/apache/tomcat/websocket/WsFrameBase.java:951: stale_update: Updating "payloadWritten" based on a stale value. Any intervening update in another thread is overwritten.
57+
58+
Error: BAD_FREE (CWE-763):
59+
bind-9.11.3/lib/isc-pkcs11/mem.c:1608: incorrect_free: "mem_put" frees incorrect pointer "si".

0 commit comments

Comments
 (0)