Code

Fix bug #1630970 Fix for buffer overflow of check_procs procprog string
authorThomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Wed, 17 Jan 2007 05:28:22 +0000 (05:28 +0000)
committerThomas Guyot-Sionnest <dermoth@users.sourceforge.net>
Wed, 17 Jan 2007 05:28:22 +0000 (05:28 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1566 f882894a-f735-0410-b71e-b25c423dba1c

THANKS.in
plugins/check_procs.c

index 01fc4587eb50ee5283e36d352b7b0ce6a9199bef..96249115e27c8d09efd2a8174faa2c5382a1d7fb 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
@@ -205,3 +205,4 @@ Duncan Ferguson
 Dick van den Burg
 Matthias Eble
 Sebastian Schubert
+Jason Hoos
index 2c8c37913063cc8e5f9e7b8115fce6d0a9cf01f2..87f00243d6c729d01389aec96cc8b5ba79e9d4a9 100644 (file)
@@ -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);