summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2019-08-26 19:30:14 -0400
committerSteve French <stfrench@microsoft.com>2019-08-27 18:25:12 -0400
commit340625e618e1b37a72a02f07aa7144ae0ab0b19e (patch)
tree9bac6626dd3e1477a93301a84c7c797b7db5526c /fs/cifs/cifsproto.h
parent478228e57f81f6cb60798d54fc02a74ea7dd267e (diff)
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.h1
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,
579 unsigned int *len, unsigned int *offset); 579 unsigned int *len, unsigned int *offset);
580 580
581void extract_unc_hostname(const char *unc, const char **h, size_t *len); 581void extract_unc_hostname(const char *unc, const char **h, size_t *len);
582int copy_path_name(char *dst, const char *src);
582 583
583#ifdef CONFIG_CIFS_DFS_UPCALL 584#ifdef CONFIG_CIFS_DFS_UPCALL
584static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses, 585static inline int get_dfs_path(const unsigned int xid, struct cifs_ses *ses,