From 68b00fd1be95b3ee5f962bf7d624c61875d8db86 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 10 Jun 2008 22:03:34 +0000 Subject: * console.c (parse_color): Check the character pointed by tail instead of its address. --- console/ChangeLog | 5 +++++ console/console.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'console') diff --git a/console/ChangeLog b/console/ChangeLog index 7422ee61..45b0dc99 100644 --- a/console/ChangeLog +++ b/console/ChangeLog @@ -1,3 +1,8 @@ +2008-06-10 Samuel Thibault + + * console.c (parse_color): Check the character pointed by tail instead + of its address. + 2007-11-13 Thomas Schwinge * console.c (netfs_attempt_utimes): Adapt to ``struct stat'' changes. diff --git a/console/console.c b/console/console.c index e4c6183d..991de2ae 100644 --- a/console/console.c +++ b/console/console.c @@ -1364,7 +1364,7 @@ parse_color (const char *name, int *number) errno = 0; nr = strtol (name, &tail, 0); - if (errno || &tail || nr < 0 || nr > CONS_COLOR_MAX) + if (errno || *tail || nr < 0 || nr > CONS_COLOR_MAX) return EINVAL; *number = nr; return 0; -- cgit v1.2.3