From 028204e0f99f0bad5dfd01add364ebd4f4befabb Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 28 Dec 2010 13:15:26 -0800 Subject: [PATCH] Interface IDs are 0-origin. That means that if an interface ID is greater than *or equal to* the number of Interface Description Blocks we've seen, we haven't seen an IDB for that interface. --- sf-pcap-ng.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sf-pcap-ng.c b/sf-pcap-ng.c index 9049991..1554320 100644 --- a/sf-pcap-ng.c +++ b/sf-pcap-ng.c @@ -1053,7 +1053,7 @@ found: /* * Is the interface ID an interface we know? */ - if (interface_id > p->sf.ifcount) { + if (interface_id >= p->sf.ifcount) { /* * Yes. Fail. */