Skip to main content.
home | support | download

Back to List Archive

Re: [SWISH-E:118] Dots in directory names can make swish-e crash

From: Simon Wilkinson <sxw(at)>
Date: Wed Jan 14 1998 - 18:01:15 GMT
> Hi everyone,
> I believe, I just found a bug in swish-e. To reproduce it do this:
> 	mkdir 13sys.tem6
> 	touch 13sys.tem6/changes
> 	touch 13sys.tem6/release-notes
> 	swish-e -i 13sys.tem6
> I believe that there must be something wrong in the way swish-e handles 
> directory names.
> The problem is the dot. Replace the dot with an '_' and it works fine. Amazing 
> is that
> "13system.6"  works!  Any other position of the dot in the name makes it crash. 
> This
> bug also exists in the old non-enhanced swish version.

Yes - I can confirm it. I've got a fix from the old non-enhanced version, which
I'll tidy up and post. IIRC the problem is with the code that does the 
extension checking - it splits the filename at the last dot that it finds,
and assumes everything after the dot is the extension (ie .html) which it
strcpy's into a fairly small string array. 

So you won't have the problem if you're indexing files like 
but you will get seg faults if you're looking at

I'll dig out and post a patch tomorrow.


Received on Wed Jan 14 10:10:11 1998