summaryrefslogtreecommitdiff
path: root/www/php4
diff options
context:
space:
mode:
authorjlam <jlam>2001-03-14 00:10:00 +0000
committerjlam <jlam>2001-03-14 00:10:00 +0000
commitfcf0368d19764244bc9f970864ec25f627dc67bd (patch)
treecab815fca3e28b54a1fafe31d924663cf0d95596 /www/php4
parent50870de5889be3616618dc0afd44b71b0609502c (diff)
downloadpkgsrc-fcf0368d19764244bc9f970864ec25f627dc67bd.tar.gz
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>.
Diffstat (limited to 'www/php4')
-rw-r--r--www/php4/files/patch-sum4
-rw-r--r--www/php4/patches/patch-ad80
2 files changed, 80 insertions, 4 deletions
diff --git a/www/php4/files/patch-sum b/www/php4/files/patch-sum
index 244412be2f0..e04b0cc405d 100644
--- a/www/php4/files/patch-sum
+++ b/www/php4/files/patch-sum
@@ -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
diff --git a/www/php4/patches/patch-ad b/www/php4/patches/patch-ad
index 657d4799d73..13b0171952d 100644
--- a/www/php4/patches/patch-ad
+++ b/www/php4/patches/patch-ad
@@ -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;
+ }
+