[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdebase/ksysguard/ksysguardd/Irix
From:       Lubos Lunak <l.lunak () kde ! org>
Date:       2002-12-12 16:49:02
[Download RAW message or body]

CVS commit by lunakl: 

strncpy() missing terminating '\0'


  M +4 -1      ProcessList.c   1.3.2.1


--- kdebase/ksysguard/ksysguardd/Irix/ProcessList.c  #1.3:1.3.2.1
@@ -197,4 +197,5 @@ static int updateProcess( pid_t pid ) {
 
         strncpy (ps->State,lwpStateName( psinfo ),8);
+        ps->State[7]='\0';
 
 
@@ -225,6 +226,8 @@ static int updateProcess( pid_t pid ) {
 
         strncpy(ps->Command,psinfo.pr_fname,PRCOMSIZ);
+        ps->Command[PRCOMSIZ-1]='\0';
 
         strncpy(ps->CmdLine,psinfo.pr_psargs,PRARGSZ);
+        ps->CmdLine[PRARGSZ-1]='\0';
 
         validateStr( ps->Command );


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic