talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 14ff3ca231e946d0f52e55afa6fe4d5f700c9348
parent d76d8d71ca65e27e20d1703d28b515f805ea5f0b
Author: Colin Leroy <colin@colino.net>
Date:   Sun, 18 Sep 2011 18:26:19 +0000

2011-09-18 [colin]	3.7.10cvs17

	* src/news.c
		Fix segfault when connection fails

Diffstat:
MChangeLog | 5+++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/news.c | 6+++++-
4 files changed, 12 insertions(+), 2 deletions(-)

diff --git 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 diff --git a/PATCHSETS b/PATCHSETS @@ -4220,3 +4220,4 @@ ( 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 diff --git a/configure.ac b/configure.ac @@ -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= diff --git a/src/news.c b/src/news.c @@ -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) { /*