ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Seg Fault - Creating new wiretap type

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Thu, 21 Oct 2010 13:16:47 -0600
On Thu, Oct 21, 2010 at 05:03:12AM -0700, Alex Lindberg wrote:

> When trying to read the first line during the initial myfile_open 
> routine, the file_gets or file_read fail with a segmentation fault. If 
> I do my own fopen for the filename, all is good, but when using 
> wth->fh, it fails. �I have copied the format found in other wiretap/*c 
> files and don't see my error.

Have you run it through a debugger?  The file handle may not be a valid 
pointer for some reason.