Wireshark-dev: [Wireshark-dev] [Patch] workaround ASN1 dissector crash on win32
From: "Richard Riley" <[email protected]>
Date: Wed, 9 Aug 2006 22:14:33 +0100

In Windows distributions the ASN1 dissector crashes when trying to load its
type table file. The problem seems to be caused by calling fstat [in C
runtime library linked to asn1.dll] on a file handle that was returned from
eth_fopen / g_fopen [in wiretap.dll / glib.dll?] and this sort of
cross-library sharing of file handles appears to upset Windows' C runtime.

I attach a simple patch to replace the three calls to eth_fopen with
straight fopen equivalents, which means that at last I can use the extremely
useful ASN1 dissector without having to boot t'other OS. Presumably a more
long-term solution would be to provide equivalent eth_fstat / g_fstat and
eth_fclose / g_fstat functions in wiretap and glib. But I'll leave that
decision to somebody else for now...



Attachment: asn1_win32_fix.diff
Description: Binary data