1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
From 960f31dece3eef8f3941aec416e990966b769b7b Mon Sep 17 00:00:00 2001
From: Shangzhi-Xu <63028857+ShangzhiXu@users.noreply.github.com>
Date: Fri, 26 Dec 2025 23:16:59 +1100
Subject: [PATCH] Increase allocated memory for timestamp index
---
src/console/dlt-sortbytimestamp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/console/dlt-sortbytimestamp.c b/src/console/dlt-sortbytimestamp.c
index 83122c50..9e7a81d3 100644
--- a/src/console/dlt-sortbytimestamp.c
+++ b/src/console/dlt-sortbytimestamp.c
@@ -391,7 +391,7 @@ int main(int argc, char *argv[]) {
message_count = (uint32_t) (1 + end - begin);
- timestamp_index = (TimestampIndex *) malloc(sizeof(TimestampIndex) * (message_count + 1));
+ timestamp_index = (TimestampIndex *) malloc(sizeof(TimestampIndex) * (message_count + 2));
if (timestamp_index == NULL) {
fprintf(stderr, "ERROR: Failed to allocate memory for message index!\n");
|