Re:Stop using strncpy already (2013)
by iamthad on Friday August 31, 2018 @11:44AM
(#17886470)
strscpy seems like a nice interface. Is an implementation outside of the kernel available? Preferably one that is permissively-licensed?
Also, it doesn't appear to be specified what happens if the count argument is too large to be represented as a ssize_t. The destination buffer would have to be extremely large, so it probably doesn't happen in practice, but it'd be good to specify it, or at least explicitly state it's unspecified / undefined.
Also, it doesn't appear to be specified what happens if the count argument is too large to be represented as a ssize_t. The destination buffer would have to be extremely large, so it probably doesn't happen in practice, but it'd be good to specify it, or at least explicitly state it's unspecified / undefined.
https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.h...