diff options
author | kris <kris@FreeBSD.org> | 2000-07-10 06:33:55 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-07-10 06:33:55 +0000 |
commit | 0d6709d662abad52676b194d6a5b7ad1ea350fe5 (patch) | |
tree | 80fbb30bb4c0bc347f54d73416ad1b227d313abf | |
parent | 04ee30c6c3149399ecf69e8ca956c386ee03938b (diff) | |
download | FreeBSD-src-0d6709d662abad52676b194d6a5b7ad1ea350fe5.zip FreeBSD-src-0d6709d662abad52676b194d6a5b7ad1ea350fe5.tar.gz |
Don't call printf with no format string. This is technically a security
vulnerability and could in principle be used to upload a new kernel from the
bootloader :-)
-rw-r--r-- | sys/boot/common/commands.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/common/commands.c b/sys/boot/common/commands.c index 0aab78e..b0fb412 100644 --- a/sys/boot/common/commands.c +++ b/sys/boot/common/commands.c @@ -326,7 +326,7 @@ command_echo(int argc, char *argv[]) s = unargv(argc, argv); if (s != NULL) { - printf(s); + printf("%s", s); free(s); } if (!nl) @@ -378,7 +378,7 @@ command_read(int argc, char *argv[]) name = (argc > 0) ? argv[0]: NULL; if (prompt != NULL) - printf(prompt); + printf("%s", prompt); if (timeout >= 0) { when = time(NULL) + timeout; while (!ischar()) |