From 4860983f8bbdb0bd061ef2f928ae7bda028273fd Mon Sep 17 00:00:00 2001 From: Werner Fink Date: Wed, 27 Jul 2011 10:49:05 +0000 Subject: [PATCH] Sulogin: respect byte order that is do not mix chars and ints --- doc/Changelog | 1 + src/sulogin.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/Changelog b/doc/Changelog index 435e624..feb79c5 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -31,6 +31,7 @@ sysvinit (2.89dsf) UNRELEASED; urgency=low * Sulogin: enforce reconnection of stdin/stdout/stderr if a device was specified. * Sulogin: if zero is read at reading the passwd guess it's done. + * Sulogin: respect byte order that is do not mix chars and ints [ Petter Reinholdtsen ] * Next release will be 2.89dsf. diff --git a/src/sulogin.c b/src/sulogin.c index 70fa334..45f5f5f 100644 --- a/src/sulogin.c +++ b/src/sulogin.c @@ -613,9 +613,9 @@ char *getpasswd(struct console *con) struct termios tty; char *ret = pass; unsigned char tc; - char ascval; + char c, ascval; int eightbit; - int c, fd; + int fd; if (con->flags & CON_NOTTY) goto out;