Re: generic strncpy - off-by-one error

Bernd Petrovitsch
2003-08-12T16:24:48Z

>I don't see any problem with this code, and if we don't need to
>NULL-pad the dest string, we do not have to. It is not in the
>definition of strncpy().

Wrong: http://www.opengroup.org/onlinepubs/007908799/xsh/strncpy.html

Bernd
--
Firmix Software GmbH http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
Embedded Linux Development and Services