lkml.org 
[lkml]   [2000]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectBug in BSD packet filter code
Hi Alan, 

While reworking the tcpdump code specific for Linux I found a bug
in net/core/filter.c. I think I don't need any explanation because
the mistake is so evident.

Here is the patch

Torsten

--
Torsten Landschoff Bluehorn@IRC <torsten@debian.org>
Debian Developer and Quality Assurance Committee Member
--- filter.c.orig Sun Jan 16 13:20:40 2000
+++ filter.c Sun Jan 16 13:20:50 2000
@@ -49,7 +49,7 @@
else if (k>=SKF_LL_OFF)
ptr = skb->mac.raw + k - SKF_LL_OFF;

- if (ptr<skb->head && ptr < skb->tail)
+ if (ptr >= skb->head && ptr < skb->tail)
return ptr;
return NULL;
}
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.054 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site