summaryrefslogtreecommitdiffstats
path: root/capinfos.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:15:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:15:59 +0000
commit489b73a4c69e01167e693d7153f973105c613c30 (patch)
tree5d72d5ab3cf7dd8efa4e1733579d216d79c8ad66 /capinfos.c
parentReleasing progress-linux version 4.2.5-2~progress7.99u1. (diff)
downloadwireshark-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/capinfos.c b/capinfos.c
index 286532d0..3452e9a5 100644
--- a/capinfos.c
+++ b/capinfos.c
@@ -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);
}
}