From e4af02e9ddec21d6ea2c8399b7c5d9d9c1e6e8e8 Mon Sep 17 00:00:00 2001
From: Thomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Date: Wed, 17 Jan 2007 05:28:22 +0000
Subject: Fix bug #1630970 Fix for buffer overflow of check_procs procprog
 string

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1566 f882894a-f735-0410-b71e-b25c423dba1c

diff --git a/THANKS.in b/THANKS.in
index 01fc458..9624911 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -205,3 +205,4 @@ Duncan Ferguson
 Dick van den Burg
 Matthias Eble
 Sebastian Schubert
+Jason Hoos
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index 2c8c379..87f0024 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -193,7 +193,7 @@ main (int argc, char **argv)
 			strip (procargs);
 
 			/* Some ps return full pathname for command. This removes path */
-			procprog = base_name(procprog);
+			strcpy(procprog, base_name(procprog));
 
 			/* we need to convert the elapsed time to seconds */
 			procseconds = convert_to_seconds(procetime);
-- 
cgit v0.10-9-g596f

