X-Authentication-Warning: mail.wingeer.org: reed set sender to reed@wingeer.org using -f Date: Wed, 26 Jul 2000 15:06:26 +0800 From: Reed Lai To: John Bafford Cc: Micheline Chang Subject: Re: WMND Mime-Version: 1.0 X-Disclaimer: I am just an amateur. X-Operating-System: FreeBSD mail.wingeer.org 3.3-RELEASE FreeBSD 3.3-RELEASE Status: Dear John, A thousand thanks! I will correct it at next change. Brgds On Tue, Jul 25, 2000 at 11:12:51AM -0400, John Bafford wrote: > Hello, there! > > I found a bug in wmifs awhile back that was causing it to core dump. I did > some testing ahd chcked the code you're using in wmnd, and it suffers the > same problem. > > The problem is that wmifs and wmnd assume that lines in /proc/net/dev are > 127 characters long or shorter. > > This, unfortunately, is not a safe assumption, as if the rx and tx bytes > and packets become long enough, the lines can be 129 characters or > longer. This can lead to segfaults or "phantom" interfaces (wmmd wants to > display stats for me for an interface named "0") depending on whether it's > loopback or eth0 that's gotten too long. > > To fix this problem you need to replace char[128] with something larger > (char[256], perhaps) and update fgets() calls as approprate. > > Thanks for updating wmifs; I like your new version a lot better than the > old one. Keep up the good work! :) > > -John > > > -- > John Bafford > dshadow@zort.net > -- Reed Lai, BV4QO | http://www.wingeer.org/bv4qo/ NIC-handle RL7000 | ICQ 19080719(H) 64518529(O)