From 0e2545ecea742206943e1cfa205c9cd60ad893a3 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 4 Jun 2024 15:54:45 +0900 Subject: [PATCH] Fix incorrect storing of size when using calloc --- src/another_memcheck.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/another_memcheck.cc b/src/another_memcheck.cc index 5286495..7e7d4ec 100644 --- a/src/another_memcheck.cc +++ b/src/another_memcheck.cc @@ -105,7 +105,7 @@ namespace SC_AM_Internal { if (address != nullptr) { Malloced *data = reinterpret_cast(real_malloc(sizeof(Malloced))); data->address = address; - data->size = size; + data->size = n * size; ListNode::add_to_list(malloced_list_tail, data); }