diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-01-23 13:10:38 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-01-23 13:10:38 -0800 |
commit | 113385c5cc81fd9d08563f1138029f718f593eb8 (patch) | |
tree | ace40a17952d6fbe4eed7d02fb2f5dfbec714632 | |
parent | b477ff98d903618a1ab8247861f2ea6e70c0f0f8 (diff) | |
parent | b8f2688258f886f0bc0c0cb3ebe51efaa12191ec (diff) |
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
-rw-r--r-- | fs/notify/inotify/inotify_fsnotify.c | 2 |
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) { |