mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-29 17:32:43 +00:00
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 :-)
This commit is contained in:
parent
c98c98a822
commit
487730cc8b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=62873
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user