summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/commands.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-07-10 06:33:55 +0000
committerkris <kris@FreeBSD.org>2000-07-10 06:33:55 +0000
commit0d6709d662abad52676b194d6a5b7ad1ea350fe5 (patch)
tree80fbb30bb4c0bc347f54d73416ad1b227d313abf /sys/boot/common/commands.c
parent04ee30c6c3149399ecf69e8ca956c386ee03938b (diff)
downloadFreeBSD-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 :-)
Diffstat (limited to 'sys/boot/common/commands.c')
-rw-r--r--sys/boot/common/commands.c4
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())
OpenPOWER on IntegriCloud