Ethereal-dev: Re: [ethereal-dev] Checked in Wiretap changes to eliminate "ftell()" calls

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Olivier Abad <abad@xxxxxxxxxxxxx>
Date: Tue, 31 Aug 1999 13:32:32 +0200
On Mon, Aug 30, 1999 at 10:28:14PM +0200, Olivier Abad wrote:
> 
> BTW, ethereal also tells me that the file is truncated. I think that the
> end of the file is not frame data, but something else. I'll try to find
> out about it tomorrow.

Here is a patch for this problem :

Index: wiretap/radcom.c
===================================================================
RCS file: /cvsroot/ethereal/wiretap/radcom.c,v
retrieving revision 1.7
diff -u -r1.7 radcom.c
--- radcom.c	1999/08/31 00:25:19	1.7
+++ radcom.c	1999/08/31 11:15:28
@@ -230,6 +230,7 @@
 	}
 	wth->data_offset += 2;
 	length = pletohs(&length);
+	if (length == 0) return 0;
 
 	if (wth->file_encap == WTAP_ENCAP_LAPB)
 		length -= 2; /* FCS */


Olivier
-- 
Every time I think I know where it's at, they move it.