aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/netmon.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-12-13 06:45:16 +0000
committerGuy Harris <guy@alum.mit.edu>2011-12-13 06:45:16 +0000
commit1df4ee91090e35c25835204d7175b9395be32606 (patch)
tree52eef117c46227f81fa7f8c163f141e114a73f2a /wiretap/netmon.c
parent4a976f1be7f36414ae9736983f5075456e11ac40 (diff)
Crank up the maximum frame table size to 512*2^20 packets, that being a
small amount bigger than the maximum possible number of packets in a NetMon file. svn path=/trunk/; revision=40174
Diffstat (limited to 'wiretap/netmon.c')
-rw-r--r--wiretap/netmon.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/wiretap/netmon.c b/wiretap/netmon.c
index fa57bc3fc0..674866fa17 100644
--- a/wiretap/netmon.c
+++ b/wiretap/netmon.c
@@ -341,10 +341,17 @@ int netmon_open(wtap *wth, int *err, gchar **err_info)
/*
* XXX - clamp the size of the frame table, so that we don't
* attempt to allocate a huge frame table and fail.
- * We shouldn't do this on 64-bit systems.
- * We pick 64 megabytes as an arbitrary limit.
+ *
+ * Given that file offsets in the frame table are 32-bit,
+ * a NetMon file cannot be bigger than 2^32 bytes.
+ * Given that a NetMon 1.x-format packet header is 8 bytes,
+ * that means a NetMon file cannot have more than
+ * 512*2^20 packets. We'll pick that as the limit for
+ * now; it's 1/8th of a 32-bit address space, which is
+ * probably not going to exhaust the address space all by
+ * itself, and probably won't exhaust the backing store.
*/
- if (frame_table_size > 16*1024*1024) {
+ if (frame_table_size > 512*1024*1024) {
*err = WTAP_ERR_UNSUPPORTED;
*err_info = g_strdup_printf("netmon: frame table length is %u, which is larger than we support",
frame_table_length);