Ethereal-dev: Re: [Ethereal-dev] asn1 dissector and default.tt

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Matthijs Melchior <mmelchior@xxxxxxxxx>
Date: Thu, 08 Jan 2004 23:39:21 +0100
Guy Harris wrote:

On Thu, Jan 08, 2004 at 10:56:03AM -0700, Greg Morris wrote:
....

If I blank out the entry it still doesn't elliminate the problem.

I'd say that's a bug.  If the pathname is blank, it should assume you
don't have a .tt file for it to read.

Attached is a quick patch that allows for an empty .tt filename and
ignores that.

We should also make that, rather than "{installation
directory}/default.tt", be the default.
I would be in favor of allowing a relative filename in the configuration
file, that is interpreted starting in the default datafile path.
A patch to do that requires more investigation than I can invest at
he moment, but I will remember for later [if noone else has done it].

--
Regards,
----------------------------------------------------------------  -o)
Matthijs Melchior                                       Maarssen  /\\
mmelchior@xxxxxxxxx                                  Netherlands _\_v
---------------------------------------------------------------- ----


--- packet-asn1.c-ORG	2003-11-13 03:16:41.000000000 +0100
+++ packet-asn1.c	2004-01-08 23:22:30.000000000 +0100
@@ -2579,6 +2579,9 @@
 	guchar *data;
 	struct stat stat;
 
+	if ((filename == 0) || (strlen(filename) == 0))
+		return;		/* no filename provided */
+
 	f = fopen(filename, "rb");
 	if (f == 0) {
 		if (strcmp(filename, default_asn1_filename) != 0 ||