Message ID | 1291530566-23531-1-git-send-email-lacombar@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index af6e9f3..ad7dbe7 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -548,8 +548,10 @@ bool sym_string_valid(struct symbol *sym, const char *str) } return true; case S_HEX: - if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) - str += 2; + if (str[0] != '\0' && + !(str[0] == '0' && (str[1] == 'x' || str[1] == 'X'))) + return false; + str += 2; ch = *str++; do { if (!isxdigit(ch))