nmh-workers
[Top][All Lists]
Advanced

[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
terminated.
Returns -E2BIG if truncation occurs.

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy



reply via email to

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