DragonFly BSD
DragonFly kernel List (threaded) for 2003-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kdebase patch


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Dec 2003 14:24:36 -0800 (PST)

:This patch builds kdebase out of CVS.
:
:Thanks to Dave Rhodus for his help on it and the other fine folks hanging
:out in #dragonflybsd on Efnet.
:----------------------------------------------------------------------
:
:        ps->vmRss    = p.kp_eproc.e_vm.vm_rssize * getpagesize();
:-       strlcpy(ps->name,p.kp_proc.p_comm ? p.kp_proc.p_comm : "????", sizeof(p
:s->name));
:+       /*strlcpy(ps->name,p.kp_proc.p_comm ? p.kp_proc.p_comm : "????", sizeof
:(ps->name));*/
:+       strncpy(ps->name,p.kp_thread.td_comm ? p.kp_thread.td_comm : "????", si
:zeof(ps->name));
:        strcpy(ps->status,(p.kp_proc.p_stat>=1)&&(p.kp_proc.p_stat<=5)? statuse
:s[p.kp_proc.p_stat-1]:"????");
: #endif
:----------------------------------------------------------------------
:
:Thanks again... Its working well here. :)
:
:Dave

    I am fairly sure that strncpy is not compatible with strlcpy.  strncpy
    will happily NOT terminate the target buffer with a \0 if the source
    buffer is too large.

    But we should have strlcpy().  Do we not have strlcpy() ?

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]