Support uppercase hex digits in cpio archives.

Thanks to: Joshua Kwan
MFC after: 7 days
This commit is contained in:
Tim Kientzle 2008-01-15 04:56:48 +00:00
parent 1083833205
commit a8f2d755d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175343

View File

@ -321,10 +321,12 @@ static int
is_hex(const char *p, size_t len)
{
while (len-- > 0) {
if (*p < '0' || (*p > '9' && *p < 'a') || *p > 'f') {
if ((*p >= '0' && *p <= '9')
|| (*p >= 'a' && *p <= 'f')
|| (*p >= 'A' && *p <= 'F'))
++p;
else
return (0);
}
++p;
}
return (1);
}