ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-commits: [Wireshark-commits] rev 42952: /trunk/ui/cli/ /trunk/ui/cli/: tap-iostat.c

Date: Thu, 31 May 2012 21:40:55 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42952

User: gerald
Date: 2012/05/31 02:40 PM

Log:
 From Martin Kaiser via bug 7312:
 
 there's three coverity defects about division by zero in ui/cli/tap-iostat.c,
 function iostat_packet()
 
 This can be triggered from the command line
 
 martin@greta# ./tshark -z io,stat,0.2,AVG\(frame.number\)
 Capturing on eth0
 Floating point exception
 
 it->num is 0, wireshark crashes in
 
 parent->max_vals[it->colnum] =                       
 MAX(parent->max_vals[it->colnum], it->counter/it->num);
 
 (and similar for other data types)
 
 My proposal for a fix is to not update parent->max_vals[it->colnum] when
 it->num==0, see the attached patch.

Directory: /trunk/ui/cli/
  Changes    Path            Action
  +2 -0      tap-iostat.c    Modified