Bug 22730

Summary: tcpslice doesn't handle long file offsets
Product: Base System Reporter: dc <dc>
Component: binAssignee: Bill Fenner <fenner>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description dc 2000-11-10 02:50:01 UTC
	tcpslice uses 'old'-style file offsets and routines
	for positioning the input file stream.  This has problems
	when the file being read gets 'large' (circa 2^31).

Fix: Patch follows; apply in src/usr.sbin/tcpdump/tcpslice.
	Gratuitous addition of braces in gwtm2secs.c to avoid gcc paranoia.
How-To-Repeat: 
	Generate a huge tcpdump file (sniff on a busy interface
	for a long time), then, try to use that file in tcpslice,
	with a starting date which is above 2GBytes in that file:

	tcpslice 973681608.015983 huge_file.td > foo

	Error reported is:

	tcpslice: fseek() failed in read_up_to()
Comment 1 Bruce A. Mah freebsd_committer freebsd_triage 2000-11-10 06:29:13 UTC
Anyone looking into problems with tcpslice should also look at 
PRs bin/10633 and bin/13691.

Bruce.

Comment 2 Bill Fenner freebsd_committer freebsd_triage 2001-10-30 18:13:03 UTC
Responsible Changed
From-To: freebsd-bugs->fenner

I'm going to release tcpslice 1.2 from tcpdump.org and then import it 
into FreeBSD.
Comment 3 Maxim Konovalov freebsd_committer freebsd_triage 2006-09-18 11:43:37 UTC
State Changed
From-To: open->closed

Duplicate of bin/13691.