Fix lame++ bug in w3m 0.1.8 (segfault when linking to local URLs),

taking code from w3m 0.1.9.

I'll let the maintainer evaluate carefully w3m 0.1.9 and integrate it...
This commit is contained in:
espie 2000-05-26 21:19:25 +00:00
parent 6e36e6ac07
commit 91fd61ca64

15
www/w3m/patches/patch-ad Normal file
View File

@ -0,0 +1,15 @@
--- main.c.orig Fri May 26 23:02:30 2000
+++ main.c Fri May 26 23:01:07 2000
@@ -1758,8 +1758,10 @@ followA(void)
parseURL2(a->url,&u,baseURL(Currentbuf));
if (u.scheme == Currentbuf->currentURL.scheme &&
u.port == Currentbuf->currentURL.port &&
- strcasecmp(u.host,Currentbuf->currentURL.host) == 0 &&
- strcmp(u.file,Currentbuf->currentURL.file) == 0) {
+ ((u.host == NULL && Currentbuf->currentURL.host == NULL) ||
+ strcasecmp(u.host, Currentbuf->currentURL.host) == 0) &&
+ ((u.file == NULL && Currentbuf->currentURL.file == NULL) ||
+ strcmp(u.file, Currentbuf->currentURL.file) == 0)) {
/* index within this buffer */
local_label = u.label;
}