From 18a5af00c1cf15852d694d20c58e7271112263d8 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 2 Feb 2014 00:18:35 -0700 Subject: * Update to version 2.19.5 * check bounds and tie strings off to improve security. Contributed by James Jerkins. * Alpine crashed when a user attempted to add a folder collection, due to bug in GET_NAMESPACE in imap4r1.c. --- imap/src/c-client/imap4r1.c | 2 +- imap/src/c-client/nntp.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'imap/src/c-client') diff --git a/imap/src/c-client/imap4r1.c b/imap/src/c-client/imap4r1.c index 9c72e642..f35b14b4 100644 --- a/imap/src/c-client/imap4r1.c +++ b/imap/src/c-client/imap4r1.c @@ -360,7 +360,7 @@ void *imap_parameters (long function,void *value) if (((IMAPLOCAL *) ((MAILSTREAM *) value)->local)->cap.namespace && !((IMAPLOCAL *) ((MAILSTREAM *) value)->local)->namespace) imap_send (((MAILSTREAM *) value),"NAMESPACE",NIL); - value = (void *) ((IMAPLOCAL *) ((MAILSTREAM *) value)->local)->namespace; + value = (void *) &((IMAPLOCAL *) ((MAILSTREAM *) value)->local)->namespace; break; case GET_THREADERS: value = (void *) diff --git a/imap/src/c-client/nntp.c b/imap/src/c-client/nntp.c index 1607db81..dd2b8604 100644 --- a/imap/src/c-client/nntp.c +++ b/imap/src/c-client/nntp.c @@ -704,6 +704,11 @@ MAILSTREAM *nntp_mopen (MAILSTREAM *stream) (stream->debug ? NOP_DEBUG : NIL)))) return NIL; } + if(!nstream->netstream){ + mm_log (nstream->reply,ERROR); + nntp_close (nstream); /* punt stream */ + return NIL; + } /* always zero messages if halfopen */ if (stream->halfopen) i = j = k = rnmsgs = nmsgs = 0; /* otherwise open the newsgroup */ -- cgit v1.2.3-54-g00ecf