From 0bb13ab6c574663488b7e722a587b95ad975d5e8 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Mon, 4 Nov 2002 08:47:37 +0000 Subject: [w3m-dev-en 00827] Re: w3m-cvs segfaults on news:// URLs * url.c (openURL): check pu->file for news: From: Fumitoshi UKAI --- url.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'url.c') diff --git a/url.c b/url.c index eede800..dd40994 100644 --- a/url.c +++ b/url.c @@ -1,4 +1,4 @@ -/* $Id: url.c,v 1.53 2002/11/02 18:12:06 ukai Exp $ */ +/* $Id: url.c,v 1.54 2002/11/04 08:47:38 ukai Exp $ */ #include "fm.h" #include #include @@ -1804,6 +1804,8 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current, fprintf(fw, "ARTICLE %s\r\n", p); } else { + if (pu->file == NULL || *pu->file == '\0') + goto nntp_error; /* pu-file contains '@' => news: */ fprintf(fw, "ARTICLE <%s>\r\n", url_unquote(pu->file)); } -- cgit v1.2.3