Discussion:
main.c: null pointer dereference
Dennis Preiser
2011-02-05 11:43:35 UTC
Permalink
The patch below fixes a null pointer dereference when starting tin
without '-g server' (e.g. reading from local spool).

Dennis

--- tin-2.0.0/src/main.c 2011-01-30 02:54:10.000000000 +0100
+++ tin-2.0.0_r1/src/main.c 2011-02-05 12:23:08.000000000 +0100
@@ -195,7 +195,7 @@ main(
/*
* Connect to nntp server?
*/
- if (!*nntp_server)
+ if (!nntp_server || !*nntp_server)
nntp_server = getserverbyfile(NNTP_SERVER_FILE);
if (read_news_via_nntp && !read_saved_news && nntp_open())
giveup();

Loading...