File: 807.patch

package info (click to toggle)
dlt-daemon 3.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,296 kB
  • sloc: ansic: 58,041; cpp: 16,199; sh: 1,769; xml: 1,440; python: 376; makefile: 31
file content (22 lines) | stat: -rw-r--r-- 950 bytes parent folder | download | duplicates (4)
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");