]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: replace various strncpy with strscpy and similar
authorRonnie Sahlberg <lsahlber@redhat.com>
Mon, 26 Aug 2019 23:30:14 +0000 (09:30 +1000)
committerSteve French <stfrench@microsoft.com>
Tue, 27 Aug 2019 22:25:12 +0000 (17:25 -0500)
commitf74b1d0f502346a0c6169fbe01ba5405709a0599
tree9bac6626dd3e1477a93301a84c7c797b7db5526c
parenta8ac3be93d5545b6405d022c53d911c50d3c9083
cifs: replace various strncpy with strscpy and similar

Using strscpy is cleaner, and avoids some problems with
handling maximum length strings.  Linus noticed the
original problem and Aurelien pointed out some additional
problems. Fortunately most of this is SMB1 code (and
in particular the ASCII string handling older, which
is less common).

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsproto.h
fs/cifs/cifssmb.c
fs/cifs/connect.c
fs/cifs/dir.c
fs/cifs/misc.c
fs/cifs/sess.c