[Pkg-shadow-devel] console.c annoying bug
cancel
suntsu at yandex.ru
Thu Dec 22 18:29:09 UTC 2011
hi, list
there is a simple buffer overflow bug in console.c
if the package compile without pam support too long CONSOLE string in
login.defs will overflow a fixed-size buffer
diff --git a/console.c b/console.c
index 843105d..b62f19c 100644
--- a/console.c
+++ b/console.c
@@ -68,8 +68,7 @@ static bool is_listed (const char *cfgin, const char
*tty, bool def) */
if (*cons != '/') {
- strcpy (buf, cons);
- while ((s = strtok (buf, ":")) != NULL) {
+ while ((s = strtok (cons, ":")) != NULL) {
if (strcmp (s, tty) == 0) {
return true;
}
More information about the Pkg-shadow-devel
mailing list