diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:15:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:15:59 +0000 |
commit | 489b73a4c69e01167e693d7153f973105c613c30 (patch) | |
tree | 5d72d5ab3cf7dd8efa4e1733579d216d79c8ad66 /capinfos.c | |
parent | Releasing progress-linux version 4.2.5-2~progress7.99u1. (diff) | |
download | wireshark-489b73a4c69e01167e693d7153f973105c613c30.tar.xz wireshark-489b73a4c69e01167e693d7153f973105c613c30.zip |
Merging upstream version 4.2.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -694,6 +694,7 @@ print_stats_table_header(capture_info *cf_info) { pkt_cmt *p; char *buf; + gsize buf_len; putquote(); printf("File name"); @@ -731,10 +732,11 @@ print_stats_table_header(capture_info *cf_info) if (pkt_comments && cf_info->pkt_cmts != NULL) { /* Packet 2^64 Comment" + NULL */ - buf = (char *)g_malloc0(strlen("Packet 18446744073709551616 Comment") + 1); + buf_len = strlen("Packet 18446744073709551616 Comment") + 1; + buf = (char *)g_malloc0(buf_len); for (p = cf_info->pkt_cmts; p != NULL; p = p->next) { - snprintf(buf, strlen(buf), "Packet %d Comment", p->recno); + snprintf(buf, buf_len, "Packet %d Comment", p->recno); print_stats_table_header_label(buf); } } |