diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2019-08-27 09:30:14 +1000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-08-27 17:25:12 -0500 |
commit | 340625e618e1b37a72a02f07aa7144ae0ab0b19e (patch) | |
tree | 9bac6626dd3e1477a93301a84c7c797b7db5526c /fs/cifs/cifsproto.h | |
parent | 478228e57f81f6cb60798d54fc02a74ea7dd267e (diff) | |
download | linux-340625e618e1b37a72a02f07aa7144ae0ab0b19e.tar.bz2 |
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>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index e23234207fc2..592a6cea2b79 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -579,6 +579,7 @@ extern void rqst_page_get_length(struct smb_rqst *rqst, unsigned int page, unsigned int *len, unsigned int *offset); void extract_unc_hostname(const char *unc, const char **h, size_t *len); +int copy_path_name(char *dst, const char *src); #ifdef CONFIG_CIFS_DFS_UPCALL static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses, |