Re: strncpy clarify result may not be null terminated

Jonny Grant
2023-11-07T14:20:02Z

On 07/11/2023 13:23, Alejandro Colomar wrote:
> On Tue, Nov 07, 2023 at 11:52:44AM +0000, Jonny Grant wrote:
>> We see things differently, I'm on the C standard side on this one. Would any information change your mind?
>
> It's difficult to say, but I doubt it. But let me ask you something:
> In what cases would you find strncpy(3) appropriate to use, and why?
> Maybe if I understand that it helps.
>
> Kind regards,
> Alex

I don't find strncpy appropriate - that's why I proposed a change to clarify the known defect in the man page of strncpy that C99 describes. Worth reading my first email if you're unclear.

If you doubt the esteemed C standards, I won't add anything further.
Kind regards Jonny