Skip to content

Commit 3cb8899

Browse files
committed
Convert MEM35-C to the new dataflow library
1 parent 25571ec commit 3cb8899

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

c/cert/src/rules/MEM35-C/InsufficientMemoryAllocatedForObject.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import cpp
2121
import codingstandards.c.cert
2222
import codingstandards.cpp.Overflow
2323
import semmle.code.cpp.controlflow.Guards
24-
import semmle.code.cpp.dataflow.TaintTracking
24+
import semmle.code.cpp.dataflow.new.TaintTracking
2525
import semmle.code.cpp.models.Models
2626

2727
/**

c/cert/test/rules/MEM35-C/InsufficientMemoryAllocatedForObject.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (InsufficientMemoryAllocatedForObject.ql:90,5-18)
2-
WARNING: module 'TaintTracking' has been deprecated and may be removed in future (InsufficientMemoryAllocatedForObject.ql:148,5-18)
31
| test.c:12:19:12:24 | call to malloc | Allocation size (32 bytes) is not a multiple of the size of 'S1' (36 bytes). | test.c:12:26:12:32 | 32 | |
42
| test.c:15:19:15:24 | call to malloc | Allocation size calculated from the size of a different type ($@). | test.c:15:26:15:35 | sizeof(<expr>) | sizeof(S1 *) |
53
| test.c:20:19:20:24 | call to malloc | Allocation size (128 bytes) is not a multiple of the size of 'S1' (36 bytes). | test.c:20:26:20:36 | ... * ... | |

0 commit comments

Comments
 (0)