2011-09-18 [colin] 3.7.10cvs17
authorColin Leroy <colin@colino.net>
Sun, 18 Sep 2011 18:26:19 +0000 (18:26 +0000)
committerColin Leroy <colin@colino.net>
Sun, 18 Sep 2011 18:26:19 +0000 (18:26 +0000)
* src/news.c
Fix segfault when connection fails

ChangeLog
PATCHSETS
configure.ac
src/news.c

index ebd1417..871c61d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-18 [colin]     3.7.10cvs17
+
+       * src/news.c
+               Fix segfault when connection fails
+
 2011-09-03 [colin]     3.7.10cvs16
 
        * src/common/ssl.c
index 1d7f347..0aaacef 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.48 -r 1.1.2.49 src/plugins/pgpinline/pgpinline.c;  cvs diff -u -r 1.1.2.58 -r 1.1.2.59 src/plugins/pgpmime/pgpmime.c;  ) > 3.7.10cvs14.patchset
 ( cvs diff -u -r 1.654.2.4295 -r 1.654.2.4296 configure.ac;  cvs diff -u -r 1.9.2.47 -r 1.9.2.48 src/common/ssl.c;  ) > 3.7.10cvs15.patchset
 ( cvs diff -u -r 1.9.2.48 -r 1.9.2.49 src/common/ssl.c;  ) > 3.7.10cvs16.patchset
+( cvs diff -u -r 1.101.2.67 -r 1.101.2.68 src/news.c;  ) > 3.7.10cvs17.patchset
index cd25589..dc48234 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=16
+EXTRA_VERSION=17
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 032210c..3f0e0e7 100644 (file)
@@ -367,7 +367,11 @@ static Session *news_session_new_for_folder(Folder *folder)
        session = news_session_new(folder, ac->nntp_server, port, userid, passwd);
 #endif
 
-       r = nntp_threaded_mode_reader(folder);
+       if (session != NULL)
+               r = nntp_threaded_mode_reader(folder);
+       else
+               r = NEWSNNTP_ERROR_CONNECTION_REFUSED;
+
        if (r != NEWSNNTP_NO_ERROR) {
            if (r == NEWSNNTP_WARNING_REQUEST_AUTHORIZATION_USERNAME) {
                /*