Fix an imap crash with a patch from libetpan CVS.
From brad, ok ckuethe.
This commit is contained in:
parent
dfa1c08396
commit
7c8b446beb
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/03/23 17:32:58 deanna Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2007/05/04 23:33:05 deanna Exp $
|
||||
|
||||
COMMENT= "mail purpose library"
|
||||
|
||||
DISTNAME= libetpan-0.49
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
CATEGORIES= mail devel
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=libetpan/}
|
||||
SHARED_LIBS= etpan 11.0
|
||||
|
32
mail/libetpan/patches/patch-src_low-level_imap_mailimap_c
Normal file
32
mail/libetpan/patches/patch-src_low-level_imap_mailimap_c
Normal file
@ -0,0 +1,32 @@
|
||||
$OpenBSD: patch-src_low-level_imap_mailimap_c,v 1.1 2007/05/04 23:33:05 deanna Exp $
|
||||
--- src/low-level/imap/mailimap.c.orig Tue Apr 17 00:23:20 2007
|
||||
+++ src/low-level/imap/mailimap.c Tue Apr 17 00:25:52 2007
|
||||
@@ -2458,18 +2458,22 @@ static int parse_greeting(mailimap * session,
|
||||
greeting_store(session, greeting);
|
||||
|
||||
if (greeting->gr_type == MAILIMAP_GREETING_RESP_COND_BYE) {
|
||||
- if (mmap_string_assign(session->imap_response_buffer,
|
||||
- greeting->gr_data.gr_bye->rsp_text->rsp_text) == NULL)
|
||||
- return MAILIMAP_ERROR_MEMORY;
|
||||
+ if (greeting->gr_data.gr_bye->rsp_text->rsp_text != NULL) {
|
||||
+ if (mmap_string_assign(session->imap_response_buffer,
|
||||
+ greeting->gr_data.gr_bye->rsp_text->rsp_text) == NULL)
|
||||
+ return MAILIMAP_ERROR_MEMORY;
|
||||
+ }
|
||||
|
||||
session->imap_response = session->imap_response_buffer->str;
|
||||
|
||||
return MAILIMAP_ERROR_DONT_ACCEPT_CONNECTION;
|
||||
}
|
||||
|
||||
- if (mmap_string_assign(session->imap_response_buffer,
|
||||
- greeting->gr_data.gr_auth->rsp_text->rsp_text) == NULL)
|
||||
- return MAILIMAP_ERROR_MEMORY;
|
||||
+ if (greeting->gr_data.gr_auth->rsp_text->rsp_text != NULL) {
|
||||
+ if (mmap_string_assign(session->imap_response_buffer,
|
||||
+ greeting->gr_data.gr_auth->rsp_text->rsp_text) == NULL)
|
||||
+ return MAILIMAP_ERROR_MEMORY;
|
||||
+ }
|
||||
|
||||
session->imap_response = session->imap_response_buffer->str;
|
||||
|
Loading…
x
Reference in New Issue
Block a user