diff options
author | Guy Harris <guy@alum.mit.edu> | 2006-12-11 02:58:38 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2006-12-11 02:58:38 +0000 |
commit | 05f1235606756d50e3ef078752da6a728c09c982 (patch) | |
tree | 2cce0b06f93406476165518ef1ad8ff12f8f1143 /epan/tap.c | |
parent | 562570782d538fca56e98ca21e73623b20624836 (diff) |
Do bounds checking on tap_packet_array.
svn path=/trunk/; revision=20106
Diffstat (limited to 'epan/tap.c')
-rw-r--r-- | epan/tap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/tap.c b/epan/tap.c index 7622b7db5a..6c8529414c 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -163,6 +163,14 @@ tap_queue_packet(int tap_id, packet_info *pinfo, const void *tap_specific_data) if(!tapping_is_active){ return; } + /* + * XXX - should we allocate this with an ep_allocator, + * rather than having a fixed maximum number of entries? + */ + if(tap_packet_index >= TAP_PACKET_QUEUE_LEN){ + g_warning("Too many taps queued"); + return; + } tpt=&tap_packet_array[tap_packet_index]; tpt->tap_id=tap_id; |