Fix a bug in the parsing code: always use the len and not 8.

This commit is contained in:
Warner Losh 2016-05-20 05:33:26 +00:00
parent 5e0a6f31e5
commit de06886d2b

View File

@ -57,7 +57,7 @@ fromhex(const char *s, int len, int *ok)
if (!*ok)
return 0;
v = 0;
for (i = 0; i < 8; i++) {
for (i = 0; i < len; i++) {
h = hex2int(s[i]);
if (h == 16) {
*ok = 0;