aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <dumbbell@FreeBSD.org>2025-07-10 23:04:29 +0000
committerJean-Sébastien Pédron <dumbbell@FreeBSD.org>2025-08-09 12:26:25 +0000
commitf0e445912658eeb80aa0bf156e778be9185e31bc (patch)
tree4c210b56a2b2d59944499689a3207efcd9cff7c6 /sys
parent7cbc4d875971860d941cc15d7f42e6cfeffbfe66 (diff)
Diffstat (limited to 'sys')
-rw-r--r--sys/compat/linuxkpi/common/src/linux_seq_file.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_seq_file.c b/sys/compat/linuxkpi/common/src/linux_seq_file.c
index 8b426825cc78..9c06fe27bebe 100644
--- a/sys/compat/linuxkpi/common/src/linux_seq_file.c
+++ b/sys/compat/linuxkpi/common/src/linux_seq_file.c
@@ -64,13 +64,10 @@ seq_read(struct linux_file *f, char *ubuf, size_t size, off_t *ppos)
return (-EINVAL);
size = min(rc - *ppos, size);
- rc = strscpy(ubuf, sbuf_data(sbuf) + *ppos, size + 1);
+ memcpy(ubuf, sbuf_data(sbuf) + *ppos, size);
+ *ppos += size;
- /* add 1 for null terminator */
- if (rc > 0)
- rc += 1;
-
- return (rc);
+ return (size);
}
int