Update php4-imap to 4.0.4.1nb2. The only change from version 4.0.4.1nb1 is
a security fix for a buffer overflow problem. The fix was provided in private email by Anil Madhavapeddy <anil@recoil.org>.
This commit is contained in:
parent
11dbfdcbad
commit
4883bda0f9
3 changed files with 93 additions and 9 deletions
|
@ -1,10 +1,10 @@
|
|||
# $NetBSD: Makefile,v 1.5 2001/03/01 18:18:16 jlam Exp $
|
||||
# $NetBSD: Makefile,v 1.6 2001/03/14 00:10:00 jlam Exp $
|
||||
|
||||
.include "../../www/php4/Makefile.module"
|
||||
|
||||
MODNAME= imap
|
||||
CATEGORIES+= mail
|
||||
PHP_PKG_VERS= nb1
|
||||
PHP_PKG_VERS= nb2
|
||||
|
||||
COMMENT= PHP4 extension for IMAP (Internet Mailbox Access Protocol)
|
||||
|
||||
|
@ -23,12 +23,20 @@ USE_SSL= # defined
|
|||
MAKE_ENV+= LTLIBRARY_OBJECTS_X="${CCLIENT_PIC_LOBJS}"
|
||||
|
||||
pre-build:
|
||||
${MKDIR} ${WRKSRC}/ext/imap/.libs; \
|
||||
cd ${WRKSRC}/ext/imap/.libs; \
|
||||
${AR} x ${CCLIENT_PIC_LIB}
|
||||
cd ${WRKSRC}/ext/imap; \
|
||||
${AR} x ${CCLIENT_PIC_LIB}; \
|
||||
for file in ${CCLIENT_PIC_OBJS}; do \
|
||||
base=`basename $${file} .o`; \
|
||||
${LN} -sf $${file} $${base}.lo; \
|
||||
${LN} -sf $${file} $${base}.slo; \
|
||||
${RM} -f $${base}.lo; \
|
||||
( ${ECHO} "#"; \
|
||||
${ECHO} "# Generated by libtool"; \
|
||||
${ECHO} "#"; \
|
||||
${ECHO} "pic_object=.libs/$${file}"; \
|
||||
${ECHO} "non_pic_object=.libs/$${file}"; \
|
||||
) > $${base}.lo; \
|
||||
${LN} -sf $${base}.lo $${base}.slo; \
|
||||
done
|
||||
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: patch-sum,v 1.9 2001/03/13 21:34:02 jlam Exp $
|
||||
$NetBSD: patch-sum,v 1.10 2001/03/14 00:10:00 jlam Exp $
|
||||
|
||||
SHA1 (patch-aa) = edbfea1d308910442c11e84a5bd04c00144170e7
|
||||
SHA1 (patch-ab) = a0d4fd0ec05ec70467c5a65b63e1beeb94a935ca
|
||||
SHA1 (patch-ad) = ec8f71932b33046b74c9c7c1091b3cc3c131be1b
|
||||
SHA1 (patch-ad) = 04b6123920c1c24dedcb032f785217ca193b7f36
|
||||
SHA1 (patch-ae) = e8a2ed7a684faf0f439ff3c26cce88c2d9b9aebc
|
||||
SHA1 (patch-af) = e6b2995d5ede074f73d69a93ab361519811268df
|
||||
SHA1 (patch-ag) = c5f04ef52b9d44cd0a4251d3074e4dbc668987e7
|
||||
|
|
|
@ -1,8 +1,28 @@
|
|||
$NetBSD: patch-ad,v 1.2 2000/12/25 21:03:47 jlam Exp $
|
||||
$NetBSD: patch-ad,v 1.3 2001/03/14 00:10:00 jlam Exp $
|
||||
|
||||
--- ext/imap/php_imap.c.orig Wed Oct 25 13:43:52 2000
|
||||
+++ ext/imap/php_imap.c
|
||||
@@ -392,7 +392,11 @@
|
||||
@@ -183,7 +183,19 @@
|
||||
void mail_close_it(zend_rsrc_list_entry *rsrc)
|
||||
{
|
||||
pils *imap_le_struct = (pils *)rsrc->ptr;
|
||||
+ IMAPLS_FETCH();
|
||||
+
|
||||
mail_close_full(imap_le_struct->imap_stream, imap_le_struct->flags);
|
||||
+
|
||||
+ if (IMAPG(imap_user)) {
|
||||
+ efree(IMAPG(imap_user));
|
||||
+ IMAPG(imap_user) = 0;
|
||||
+ }
|
||||
+ if (IMAPG(imap_password)) {
|
||||
+ efree(IMAPG(imap_password));
|
||||
+ IMAPG(imap_password) = 0;
|
||||
+ }
|
||||
+
|
||||
efree(imap_le_struct);
|
||||
}
|
||||
|
||||
@@ -392,7 +404,11 @@
|
||||
ZEND_INIT_MODULE_GLOBALS(imap, php_imap_init_globals, NULL)
|
||||
|
||||
|
||||
|
@ -15,3 +35,59 @@ $NetBSD: patch-ad,v 1.2 2000/12/25 21:03:47 jlam Exp $
|
|||
#ifndef PHP_WIN32
|
||||
mail_link(&unixdriver); /* link in the unix driver */
|
||||
#endif
|
||||
@@ -633,6 +649,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (IMAPG(imap_user)) {
|
||||
+ efree(IMAPG(imap_user));
|
||||
+ }
|
||||
+
|
||||
+ if (IMAPG(imap_password)) {
|
||||
+ efree(IMAPG(imap_password));
|
||||
+ }
|
||||
+
|
||||
IMAPG(imap_user) = estrndup(Z_STRVAL_PP(user), Z_STRLEN_PP(user));
|
||||
IMAPG(imap_password) = estrndup(Z_STRVAL_PP(passwd), Z_STRLEN_PP(passwd));
|
||||
|
||||
@@ -712,6 +736,8 @@
|
||||
}
|
||||
}
|
||||
efree(hashed_details);
|
||||
+ efree(IMAPG(imap_user)); IMAPG(imap_user) = 0;
|
||||
+ efree(IMAPG(imap_password)); IMAPG(imap_password) = 0;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -721,6 +747,8 @@
|
||||
node = malloc(sizeof(pils));
|
||||
if (node == NULL) {
|
||||
efree(hashed_details);
|
||||
+ efree(IMAPG(imap_user)); IMAPG(imap_user) = 0;
|
||||
+ efree(IMAPG(imap_password)); IMAPG(imap_password) = 0;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -757,6 +785,8 @@
|
||||
|
||||
free(headp);
|
||||
efree(hashed_details);
|
||||
+ efree(IMAPG(imap_user)); IMAPG(imap_user) = 0;
|
||||
+ efree(IMAPG(imap_password)); IMAPG(imap_password) = 0;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -766,11 +796,11 @@
|
||||
} else {
|
||||
#endif
|
||||
imap_stream = mail_open(NIL, Z_STRVAL_PP(mailbox), flags);
|
||||
- efree(IMAPG(imap_user));
|
||||
- efree(IMAPG(imap_password));
|
||||
|
||||
if (imap_stream == NIL) {
|
||||
php_error(E_WARNING, "Couldn't open stream %s\n", (*mailbox)->value.str.val);
|
||||
+ efree(IMAPG(imap_user)); IMAPG(imap_user) = 0;
|
||||
+ efree(IMAPG(imap_password)); IMAPG(imap_password) = 0;
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue