[PATCH] readprofile-tained-ptr
Sergey Gubarev
sergeygubarev263 at gmail.com
Sat Mar 1 12:55:25 UTC 2025
---
busybox/util-linux/readprofile.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/busybox/util-linux/readprofile.c b/busybox/util-linux/readprofile.c
index f11c622..a11fe95 100644
--- a/busybox/util-linux/readprofile.c
+++ b/busybox/util-linux/readprofile.c
@@ -248,7 +248,10 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv)
}
fn_add = next_add;
- strcpy(fn_name, next_name);
+ if (strlen(next_name) < S_LEN) {
+ strncpy(fn_name, next_name, S_LEN - 1);
+ fn_name[S_LEN - 1] = '\0';
+ }
maplineno++;
}
--
2.30.2
More information about the busybox
mailing list