tech-kern archive

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

re: Length of wmesg for condvar?



> On Mon, Aug 09, 2010 at 02:38:32AM -0400, Matthew Mondor wrote:
> > On Sun, 8 Aug 2010 17:23:23 -0700 (PDT)
> > Paul Goyette <paul%whooppee.com@localhost> wrote:
> > 
> > > Should these be changed?  Are there any adverse effects from having a 
> > > wmesg longer than 8 characters?
> > 
> > It seems to me that the exporter of those use strncpy() ....
> 
> strncpy() is unlikely to do what is expected of it.
> strlcpy() is probably rather better.

these are not (stored) as normal C-strings.  if they're
the full 8 chars, they'll have no nul.


.mrg.


Home | Main Index | Thread Index | Old Index