- From: Jean Alexis Montignies <ja@lithnext.epfl.ch>
- Date: Fri, 22 Jul 94 12:11:44 +0100
- To: www-lib@www0.cern.ch
In the module HTFile.c from the CERN WWW library, version 2.15, there are these lines. /* Directory access is allowed and possible */ logical = HTAnchor_address((HTAnchor*)anchor); tail = strrchr(logical, '/') +1; /* last part or "" */ but when there is no '/' in the string, strrchr returns NILL, wich become 0x0001. This made my browser stop on the URL 'file:'. I've replaced the line: 'tail = strrchr(logical, '/') +1; /* last part or "" */' by (this is a quick hack): { char *tempTail; if (tempTail = strrchr(logical, '/')) tail=tempTail+1; else tail=tail+strlen(tail); } I've also seen that there are other similar uses of the 'strrchr' function. This may cause some other bugs. Jean-Alexis
Received on Friday, 22 July 1994 12:14:59 UTC