Преглед изворни кода

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
Thomas Guyot-Sionnest пре 19 година
родитељ
комит
e4af02e9dd
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 1 0
      THANKS.in
  2. 1 1
      plugins/check_procs.c

+ 1 - 0
THANKS.in

@@ -205,3 +205,4 @@ Duncan Ferguson
 Dick van den Burg
 Matthias Eble
 Sebastian Schubert
+Jason Hoos

+ 1 - 1
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);