Index: stand/efi/libefi/efi_console.c =================================================================== --- stand/efi/libefi/efi_console.c +++ stand/efi/libefi/efi_console.c @@ -492,9 +492,9 @@ errno = 0; val = (int)strtol(value, &end, 0); - if (errno != 0 || *end != '\0') { + if (errno != 0 || *end != '\0' || val < 0 || val > 15) { printf("Allowed values are either ansi color name or " - "number from range [0-7].\n"); + "number from range [0-15].\n"); return (CMD_OK); } evalue = value; Index: stand/i386/libi386/vidconsole.c =================================================================== --- stand/i386/libi386/vidconsole.c +++ stand/i386/libi386/vidconsole.c @@ -579,9 +579,9 @@ errno = 0; val = (int)strtol(value, &end, 0); - if (errno != 0 || *end != '\0') { + if (errno != 0 || *end != '\0' || val < 0 || val > 15) { printf("Allowed values are either ansi color name or " - "number from range [0-7].\n"); + "number from range [0-15].\n"); return (CMD_OK); } evalue = value;