[Top][All Lists]

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

Re: [Nmh-workers] strncpy(3), die, die, die.

From: Ralph Corderoy
Subject: Re: [Nmh-workers] strncpy(3), die, die, die.
Date: Sat, 29 Oct 2016 16:35:25 +0100

Hi Steffen,

> Therefore i think a function like the Linux strscpy()

That was a new one to me.  I found it, https://manned.org/strscpy.9
It's defined in the Linux kernel.

    ssize_t strscpy(char * dest, const char * src, size_t count);

Does nothing if count is zero.  Otherwise, it's dest's size.
Copies src to dest, as much as fits, truncating, and ensuring it's NUL
Returns -E2BIG if truncation occurs.

Cheers, Ralph.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]