[Pkg-php-commits] r1150 - in php5/trunk/debian: . patches

Raphael Geissert atomo64-guest at alioth.debian.org
Sat Sep 6 18:58:38 UTC 2008


tags 423296 pending
thanks

Author: atomo64-guest
Date: 2008-09-06 18:58:38 +0000 (Sat, 06 Sep 2008)
New Revision: 1150

Added:
   php5/trunk/debian/patches/snmp_leaks.patch
Modified:
   php5/trunk/debian/changelog
   php5/trunk/debian/patches/series
   php5/trunk/debian/php5-dev.lintian-overrides
Log:
snmp_leaks.patch: fixes memory leaks in the snmp extension (Closes: #423296)
 - Thanks to Rodrigo Campos <rodrigocc at gmail.com> for the follow up
 - Thanks to Federico Cuello for the original patch
php5-dev.lintian-override: fix it so it actually works
debian/changelog: typo fix in old entry


Modified: php5/trunk/debian/changelog
===================================================================
--- php5/trunk/debian/changelog	2008-09-01 12:20:28 UTC (rev 1149)
+++ php5/trunk/debian/changelog	2008-09-06 18:58:38 UTC (rev 1150)
@@ -2,6 +2,12 @@
 
   * NOT RELEASED YET
 
+  [ Raphael Geissert ]
+  * snmp_leaks.patch: fixes memory leaks in the snmp extension (Closes: #423296)
+    - Thanks to Rodrigo Campos <rodrigocc at gmail.com> for the follow up
+    - Thanks to Federico Cuello for the original patch
+  * php5-dev.lintian-override: fix it so it actually works
+
  -- Sean Finney <seanius at debian.org>  Thu, 21 Aug 2008 19:17:21 +0200
 
 php5 (5.2.6-3) unstable; urgency=high
@@ -137,7 +143,7 @@
     - adds notes (Debian-specific) of which security features applications 
       should not rely on
     - add more information of why some variables were enabled
-    - reorder the description of chagnes to suit the location in the config file
+    - reorder the description of changes to suit the location in the config file
     - add notes of deprecated features in PHP6
     - add more (suggested) changes to the session module to make a more secure
       use and storage of session IDs.

Modified: php5/trunk/debian/patches/series
===================================================================
--- php5/trunk/debian/patches/series	2008-09-01 12:20:28 UTC (rev 1149)
+++ php5/trunk/debian/patches/series	2008-09-06 18:58:38 UTC (rev 1150)
@@ -35,3 +35,4 @@
 libedit_is_editline.patch
 bad_whatis_entries.patch
 deprecated_freetds_check.patch
+snmp_leaks.patch

Added: php5/trunk/debian/patches/snmp_leaks.patch
===================================================================
--- php5/trunk/debian/patches/snmp_leaks.patch	                        (rev 0)
+++ php5/trunk/debian/patches/snmp_leaks.patch	2008-09-06 18:58:38 UTC (rev 1150)
@@ -0,0 +1,79 @@
+Index: php5-5.2.6/ext/snmp/snmp.c
+===================================================================
+--- php5-5.2.6.orig/ext/snmp/snmp.c
++++ php5-5.2.6/ext/snmp/snmp.c
+@@ -20,7 +20,7 @@
+    +----------------------------------------------------------------------+
+  */
+ 
+-/* $Id: snmp.c,v 1.106.2.2.2.6 2007/12/31 07:20:11 sebastian Exp $ */
++/* $Id: snmp.c,v 1.106.2.2.2.7 2008/09/06 08:18:38 indeyets Exp $ */
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
+@@ -417,13 +417,13 @@ static void php_snmp_internal(INTERNAL_F
+ 	while (keepwalking) {
+ 		keepwalking = 0;
+ 		if ((st == SNMP_CMD_GET) || (st == SNMP_CMD_GETNEXT)) {
+-			pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT);
+ 			name_length = MAX_OID_LEN;
+ 			if (!snmp_parse_oid(objid, name, &name_length)) {
+ 				php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid object identifier: %s", objid);
+ 				snmp_close(ss);
+ 				RETURN_FALSE;
+ 			}
++			pdu = snmp_pdu_create((st == SNMP_CMD_GET) ? SNMP_MSG_GET : SNMP_MSG_GETNEXT);
+ 			snmp_add_null_var(pdu, name, name_length);
+ 		} else if (st == SNMP_CMD_SET) {
+ 			pdu = snmp_pdu_create(SNMP_MSG_SET);
+@@ -434,6 +434,7 @@ static void php_snmp_internal(INTERNAL_F
+ 				sprint_objid(buf, name, name_length);
+ #endif
+ 				php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not add variable: %s %c %s", buf, type, value);
++				snmp_free_pdu(pdu);
+ 				snmp_close(ss);
+ 				RETURN_FALSE;
+ 			}
+@@ -467,11 +468,13 @@ retry:
+ 						*return_value = *snmpval;
+ 						zval_copy_ctor(return_value);
+ 						zval_ptr_dtor(&snmpval);
++						snmp_free_pdu(response);
+ 						snmp_close(ss);
+ 						return;
+ 					} else if (st == SNMP_CMD_GETNEXT) {
+ 						*return_value = *snmpval;
+ 						zval_copy_ctor(return_value);
++						snmp_free_pdu(response);
+ 						snmp_close(ss);
+ 						return;
+ 					} else if (st == SNMP_CMD_WALK) {
+@@ -510,23 +513,28 @@ retry:
+ 					}
+ 					if (st == SNMP_CMD_GET) {
+ 						if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GET)) != NULL) {
++							snmp_free_pdu(response);
+ 							goto retry;
+ 						}
+ 					} else if (st == SNMP_CMD_SET) {
+ 						if ((pdu = snmp_fix_pdu(response, SNMP_MSG_SET)) != NULL) {
++							snmp_free_pdu(response);
+ 							goto retry;
+ 						}
+ 					} else if (st == SNMP_CMD_GETNEXT) {
+ 						if ((pdu = snmp_fix_pdu(response, SNMP_MSG_GETNEXT)) != NULL) {
++							snmp_free_pdu(response);
+ 							goto retry;
+ 						}
+ 					} else if (st >= SNMP_CMD_WALK) { /* Here we do walks. */
+ 						if ((pdu = snmp_fix_pdu(response, ((session->version == SNMP_VERSION_1)
+ 										? SNMP_MSG_GETNEXT
+ 										: SNMP_MSG_GETBULK))) != NULL) {
++							snmp_free_pdu(response);
+ 							goto retry;
+ 						}
+ 					}
++					snmp_free_pdu(response);
+ 					snmp_close(ss);
+ 					if (st == SNMP_CMD_WALK || st == SNMP_CMD_REALWALK) {
+ 						zval_dtor(return_value);

Modified: php5/trunk/debian/php5-dev.lintian-overrides
===================================================================
--- php5/trunk/debian/php5-dev.lintian-overrides	2008-09-01 12:20:28 UTC (rev 1149)
+++ php5/trunk/debian/php5-dev.lintian-overrides	2008-09-06 18:58:38 UTC (rev 1150)
@@ -1 +1 @@
-W: php5-dev: script-not-executable ./usr/lib/php5/build/run-tests.php
+php5-dev: script-not-executable ./usr/lib/php5/build/run-tests.php




More information about the Pkg-php-commits mailing list