summaryrefslogtreecommitdiff
path: root/imap/src
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2014-02-02 00:18:35 -0700
committerEduardo Chappa <chappa@washington.edu>2014-02-02 00:18:35 -0700
commit18a5af00c1cf15852d694d20c58e7271112263d8 (patch)
tree5b46b810260e0161cb3c9eac5e04d80712651b84 /imap/src
parent1bf084e1ed4cd931b08e233a3f5c30cc9de05dfc (diff)
downloadalpine-18a5af00c1cf15852d694d20c58e7271112263d8.tar.xz
* 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.
Diffstat (limited to 'imap/src')
-rw-r--r--imap/src/c-client/imap4r1.c2
-rw-r--r--imap/src/c-client/nntp.c5
2 files changed, 6 insertions, 1 deletions
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 */