[monitoring-plugins] check_apt: fix memset

Holger Weiss git at monitoring-plugins.org
Thu Nov 27 00:00:08 CET 2014


    Module: monitoring-plugins
    Branch: maint
    Commit: b7fc2eb15aa02da234e9fd2f4ab021bfff6c00c2
    Author: Sebastian Herbszt <herbszt at gmx.de>
 Committer: Holger Weiss <holger at zedat.fu-berlin.de>
      Date: Wed Nov 26 23:51:00 2014 +0100
       URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=b7fc2eb

check_apt: fix memset

Fix memset introduced by commit 9ce7369 ("plugins/check_apt.c - Print uninitialized ereg").

Signed-off-by: Sebastian Herbszt <herbszt at gmx.de>

---

 plugins/check_apt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/check_apt.c b/plugins/check_apt.c
index 07622c2..8747f90 100644
--- a/plugins/check_apt.c
+++ b/plugins/check_apt.c
@@ -224,7 +224,7 @@ int run_upgrade(int *pkgcount, int *secpkgcount){
 	char *cmdline=NULL, rerrbuf[64];
 
 	/* initialize ereg as it is possible it is printed while uninitialized */
-	memset(&ereg, "\0", sizeof(ereg.buffer));
+	memset(&ereg, '\0', sizeof(ereg.buffer));
 
 	if(upgrade==NO_UPGRADE) return STATE_OK;
 



More information about the Commits mailing list