is ut_user[] in struct utmpx NUL terminated?

Ed Schouten ed at nuxi.nl
Wed May 25 21:26:50 UTC 2016


2016-05-25 23:26 GMT+02:00 Ed Schouten <ed at nuxi.nl>:
> Keep in mind that strcpy() is called with a size that is at most one
> less than sizeof(ut->ut_user). The final byte in the array is never
> overwritten.

Sorry; strncpy() of course.

-- 
Ed Schouten <ed at nuxi.nl>
Nuxi, 's-Hertogenbosch, the Netherlands
KvK-nr.: 62051717


More information about the freebsd-arch mailing list