Support uppercase hex digits in cpio archives.
Thanks to: Joshua Kwan MFC after: 7 days
This commit is contained in:
parent
1083833205
commit
a8f2d755d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=175343
@ -321,10 +321,12 @@ static int
|
|||||||
is_hex(const char *p, size_t len)
|
is_hex(const char *p, size_t len)
|
||||||
{
|
{
|
||||||
while (len-- > 0) {
|
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);
|
return (0);
|
||||||
}
|
|
||||||
++p;
|
|
||||||
}
|
}
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user