[flow-tools] flow-export 0.56 segfaults

Mark Fullmer maf@splintered.net
Mon, 8 Apr 2002 17:50:48 -0400


It's fixed in 0.57.  Here's the diff:

diff -r1.11 -r1.13
26c26
<  *      $Id: flow-export.c,v 1.11 2001/12/28 21:39:25 maf Exp $
---
>  *      $Id: flow-export.c,v 1.13 2002/02/07 20:12:50 maf Exp $
502a503,510
>     cur.srcport = ((u_int16*)(rec+fo.srcport));
>     cur.dstport = ((u_int16*)(rec+fo.dstport));
>     cur.prot = ((u_int8*)(rec+fo.prot));
>     cur.tos = ((u_int8*)(rec+fo.tos));
>     cur.srcaddr = ((u_int32*)(rec+fo.srcaddr));
>     cur.dstaddr = ((u_int32*)(rec+fo.dstaddr));
> 
> 
606c614
<       opt->ft_mask &= FT_XFIELD_V7_MASK;
---
>       opt->ft_mask &= FT_XFIELD_V1005_MASK;


On Mon, Apr 08, 2002 at 04:11:43PM -0500, Gerald Combs wrote:
> I recently installed flow-tools 0.56, and every time I run
> "flow-export -f1" I get a segmentation fault.  Here's the gdb backtrace:
> 
> #0  0x0804a20f in format1 (ftio=0xbffff800, opt=0xbffff790)
>     at flow-export.c:503
> #1  0x080494e8 in main (argc=2, argv=0xbffff9c4) at flow-export.c:136
> #2  0x40069306 in __libc_start_main (main=0x8049310 <main>, argc=2,
>     ubp_av=0xbffff9c4, init=0x8048e1c <_init>, fini=0x8062a40 <_fini>,
>     rtld_fini=0x4000d2dc <_dl_fini>, stack_end=0xbffff9bc)
>     at ../sysdeps/generic/libc-start.c:129
> 
> The variable "cur" is being referenced without being initialized.
> 
> 
> 
> _______________________________________________
> flow-tools@splintered.net
> http://www.splintered.net/sw/flow-tools