[Pkg-nagios-changes] [pkg-nagios-plugins] 215/413: check_http: add fix for large files

Jan Wagner waja at moszumanska.debian.org
Tue Nov 26 23:13:25 UTC 2013


This is an automated email from the git hooks/post-receive script.

waja pushed a commit to branch master
in repository pkg-nagios-plugins.

commit 507277ff4c2945d9be8369a8bbeb20241c328088
Author: Jan Wagner <waja at cyconet.org>
Date:   Wed Mar 3 08:14:36 2010 +0000

    check_http: add fix for large files
---
 debian/changelog                                   |  4 ++-
 debian/patches/00list                              |  1 +
 .../patches/43_check_http_large_pages_mleak.dpatch | 41 ++++++++++++++++++++++
 3 files changed, 45 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c373780..52f693d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,10 @@ nagios-plugins (1.4.14-2) UNRELEASED; urgency=low
   * Add some hints to NEWS.Debian about the use on non-linux archs
   * Bump Standards-Version to 3.8.4, no changes needed
   * Add 1.0 to debian/source/format
+  * Add 43_check_http_large_pages_mleak.dpatch, taken from upstream, which
+    fixes memory leaks on large files
 
- -- Jan Wagner <waja at cyconet.org>  Sat, 23 Jan 2010 01:39:31 +0100
+ -- Jan Wagner <waja at cyconet.org>  Wed, 03 Mar 2010 08:13:31 +0100
 
 nagios-plugins (1.4.14-1) unstable; urgency=low
 
diff --git a/debian/patches/00list b/debian/patches/00list
index 23375ff..d49f91e 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -18,3 +18,4 @@
 40_check_http_proxy_auth.dpatch
 41_check_ping_detect_args.dpatch
 42_check_linux_raid_fix_r10.dpatch
+43_check_http_large_pages_mleak.dpatch
diff --git a/debian/patches/43_check_http_large_pages_mleak.dpatch b/debian/patches/43_check_http_large_pages_mleak.dpatch
new file mode 100644
index 0000000..a571d97
--- /dev/null
+++ b/debian/patches/43_check_http_large_pages_mleak.dpatch
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 43_check_http_large_pages_mleak.dpatch
+## From: Ton Voon <ton.voon at opsera.com>
+## Date: Fri, 26 Feb 2010 12:47:38 +0000
+## Subject: [PATCH] Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455)
+## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git?a=commitdiff_plain;h=6b782ebfd4832c1fe621556bcf894162b8caa8aa
+##
+## DP:  Fix memory leak in check_http for large pages
+
+ at DPATCH@
+
+---
+ plugins/check_http.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/plugins/check_http.c b/plugins/check_http.c
+index 0a4b12b..5cdf144 100644
+--- a/plugins/check_http.c
++++ b/plugins/check_http.c
+@@ -784,6 +784,7 @@ check_http (void)
+   int i = 0;
+   size_t pagesize = 0;
+   char *full_page;
++  char *full_page_new;
+   char *buf;
+   char *pos;
+   long microsec;
+@@ -871,7 +872,9 @@ check_http (void)
+   full_page = strdup("");
+   while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) {
+     buffer[i] = '\0';
+-    asprintf (&full_page, "%s%s", full_page, buffer);
++    asprintf (&full_page_new, "%s%s", full_page, buffer);
++    free (full_page);
++    full_page = full_page_new;
+     pagesize += i;
+ 
+                 if (no_body && document_headers_done (full_page)) {
+-- 
+1.6.3
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-nagios-plugins.git



More information about the Pkg-nagios-changes mailing list