summaryrefslogtreecommitdiff
path: root/include/linux/string.h
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2024-09-30 10:50:54 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2024-09-30 10:50:54 +0200
commit2dd0ef5d951e9b565ddb324fe26c531b6a40bf82 (patch)
treeb24f5029eaa4cea229163c14549f571499c36fde /include/linux/string.h
parent15499749fbb864cc0737bc8ecaf0e28a6b6d62dd (diff)
parent9852d85ec9d492ebef56dc5f229416c925758edc (diff)
Merge drm/drm-next into drm-misc-next
Get drm-misc-next to up v6.12-rc1. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'include/linux/string.h')
-rw-r--r--include/linux/string.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 5855c5626b4b..0dd27afcfaf7 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -76,12 +76,16 @@ ssize_t sized_strscpy(char *, const char *, size_t);
* known size.
*/
#define __strscpy0(dst, src, ...) \
- sized_strscpy(dst, src, sizeof(dst) + __must_be_array(dst))
-#define __strscpy1(dst, src, size) sized_strscpy(dst, src, size)
+ sized_strscpy(dst, src, sizeof(dst) + __must_be_array(dst) + \
+ __must_be_cstr(dst) + __must_be_cstr(src))
+#define __strscpy1(dst, src, size) \
+ sized_strscpy(dst, src, size + __must_be_cstr(dst) + __must_be_cstr(src))
#define __strscpy_pad0(dst, src, ...) \
- sized_strscpy_pad(dst, src, sizeof(dst) + __must_be_array(dst))
-#define __strscpy_pad1(dst, src, size) sized_strscpy_pad(dst, src, size)
+ sized_strscpy_pad(dst, src, sizeof(dst) + __must_be_array(dst) + \
+ __must_be_cstr(dst) + __must_be_cstr(src))
+#define __strscpy_pad1(dst, src, size) \
+ sized_strscpy_pad(dst, src, size + __must_be_cstr(dst) + __must_be_cstr(src))
/**
* strscpy - Copy a C-string into a sized buffer