cifs: don't cargo-cult strndup()
strndup(s, strlen(s)) is a highly unidiomatic way to spell strdup(s); it's *NOT* safer in any way, since strlen() is just as sensitive to NUL-termination as strdup() is. strndup() is for situations when you need a copy of a known-sized substring, not a magic security juju to drive the bad spirits away. Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk> Signed-off-by: NSteve French <stfrench@microsoft.com>
Showing
想要评论请 注册 或 登录