aboutsummaryrefslogtreecommitdiffstats
path: root/file.h
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-10-26 16:00:40 -0700
committerGuy Harris <gharris@sonic.net>2020-10-26 16:52:58 -0700
commit639891651f7caca3a427467edbe608f90e88a060 (patch)
tree090aca21de57ed68ae54b538fffc2742e998ed9d /file.h
parenta88d72dc8e91312a1fe95ef54d7a1dc0a1350a7d (diff)
Impose limits on the number of records we read.
Start the limit at 2^32-1, as we use a guint32 to store the frame number. With Qt prior to Qt 6, lower the limit to 53 million packets; this should fix issue #16908.
Diffstat (limited to 'file.h')
-rw-r--r--file.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/file.h b/file.h
index 623fafb1fa..c9a5614b68 100644
--- a/file.h
+++ b/file.h
@@ -81,6 +81,14 @@ typedef struct {
} match_data;
/**
+ * Set maximum number of records per capture file.
+ *
+ * @param max_records maximum number of records to support.
+ */
+extern void
+cf_set_max_records(guint max_records);
+
+/**
* Add a capture file event callback.
*
* @param func The function to be called for each event.