3 ms·
strscpy seems like a nice interface. Is an implementation outside of the kernel available? Preferably one that is permissively-licensed? Also, it doesn't appea
by iamthad 8y ago
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.
https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.html https://www.kernel.org/doc/htmldocs/kernel-api/API-strscpy.h...