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

Wireshark-bugs: [Wireshark-bugs] [Bug 7266] Patch: Add frame.interface_id support for ERF file f

Date: Mon, 30 Jul 2012 09:34:58 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7266

--- Comment #9 from Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> 2012-07-30 09:34:57 PDT ---
Hi,

If you try to save ERF file in pcapng libwiretap will SIGFPE inside
pcapng_write_enhanced_packet_block()

Program received signal SIGFPE, Arithmetic exception.
0x00007f54d37d54f4 in pcapng_write_enhanced_packet_block (wdh=0x36055f0,
phdr=0x7fffab4fc280, pseudo_header=0x7fffab50c3a0, pd=0x7fffab4fc3a0 "",
err=0x7fffab4fc27c)
    at pcapng.c:3172
3172                   (phdr->ts.nsecs /
(1000000000/int_data.time_units_per_second));

(gdb) print int_data.time_units_per_second
$1 = 4294967296   ; (1LL << 32)

(gdb) print 1000000000/int_data.time_units_per_second
$2 = 0

(gdb) bt
#0  0x00007f54d37d54f4 in pcapng_write_enhanced_packet_block (wdh=0x36055f0,
phdr=0x7fffab4fc280, pseudo_header=0x7fffab50c3a0, pd=0x7fffab4fc3a0 "",
err=0x7fffab4fc27c)
    at pcapng.c:3172
#1  0x00007f54d37d5cb0 in pcapng_dump (wdh=0x36055f0, phdr=0x7fffab4fc280,
pseudo_header=0x7fffab50c3a0, pd=0x7fffab4fc3a0 "", err=0x7fffab4fc27c) at
pcapng.c:3403
#2  0x00007f54d37ae0dc in wtap_dump (wdh=0x36055f0, phdr=0x7fffab4fc280,
pseudo_header=0x7fffab50c3a0, pd=0x7fffab4fc3a0 "", err=0x7fffab4fc27c) at
file_access.c:1351
#3  0x0000000000442c32 in save_packet ()

It can be also reproduced with editcap:
 $ editcap /tmp/64byte-ethernet-udp-4interfaces.erf a.pcap
 Floating point exception

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.