From 4d1186c00397664923f2efc23ddeeca5753a14ef Mon Sep 17 00:00:00 2001 From: okuji Date: Mon, 9 Aug 1999 02:22:42 +0000 Subject: [PATCH] fix password handling --- ChangeLog | 6 ++++++ THANKS | 1 + stage2/stage2.c | 6 +++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fac78f7eb..adac95218 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-08-09 OKUJI Yoshinori + + * stage2/stage2.c (run_menu): Terminate the string PASSWORD + before checking if ENTERED is identical to PASSWORD. Reported + by Mark Lundeberg . + 1999-08-08 OKUJI Yoshinori * stage2/stage2.c (set_line_normal): New function. diff --git a/THANKS b/THANKS index 838fb066b..870ef6607 100644 --- a/THANKS +++ b/THANKS @@ -15,6 +15,7 @@ Eric Hanchrow Heiko Schroeder Klaus Reichl Kunihiro Ishiguro +Mark Lundeberg Miles Bader OKUJI Yoshinori Pavel Roskin diff --git a/stage2/stage2.c b/stage2/stage2.c index ccf055462..50511d187 100644 --- a/stage2/stage2.c +++ b/stage2/stage2.c @@ -364,8 +364,12 @@ restart: gotoxy(1, 21); get_cmdline (" Password: ", commands, entered, 31, '*'); - while (! isspace (*pptr)) + while (! isspace (*pptr) && *pptr) pptr ++; + + /* Make sure that PASSWORD is NUL-terminated. */ + *pptr++ = 0; + if (! strcmp (password, entered)) { char *new_file = config_file;