On Tue, 2002-11-19 at 16:57, Andrew Dalgleish wrote:
> No, it would not. strncpy does NOT append the trailing 0 if the
> length of the source is greater than or equal to the count.
>
> Using sizeof(dst)-1 will leave the last byte in the buffer unchanged.
> If dst is on the stack there is no guaran...
> No, it would not. strncpy does NOT append the trailing 0 if the
> length of the source is greater than or equal to the count.
>
> Using sizeof(dst)-1 will leave the last byte in the buffer unchanged.
> If dst is on the stack there is no guaran...
[ more ]