summaryrefslogtreecommitdiffstats
path: root/fs/notify
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-01-23 22:10:38 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2025-01-23 22:10:38 +0100
commit113385c5cc81fd9d08563f1138029f718f593eb8 (patch)
treeace40a17952d6fbe4eed7d02fb2f5dfbec714632 /fs/notify
parentMerge tag 'xfs-merge-6.14' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux (diff)
parentinotify: Use strscpy() for event->name copies (diff)
downloadlinux-113385c5cc81fd9d08563f1138029f718f593eb8.tar.xz
linux-113385c5cc81fd9d08563f1138029f718f593eb8.zip
Merge tag 'fsnotify_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull inotify update from Jan Kara: "A small inotify strcpy() cleanup" * tag 'fsnotify_for_v6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: inotify: Use strscpy() for event->name copies
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/inotify/inotify_fsnotify.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/inotify/inotify_fsnotify.c b/fs/notify/inotify/inotify_fsnotify.c
index 993375f0db67..cd7d11b0eb08 100644
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -121,7 +121,7 @@ int inotify_handle_inode_event(struct fsnotify_mark *inode_mark, u32 mask,
event->sync_cookie = cookie;
event->name_len = len;
if (len)
- strcpy(event->name, name->name);
+ strscpy(event->name, name->name, event->name_len + 1);
ret = fsnotify_add_event(group, fsn_event, inotify_merge);
if (ret) {