mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05:00
Support uppercase hex digits in cpio archives.
Thanks to: Joshua Kwan MFC after: 7 days
This commit is contained in:
parent
1083833205
commit
a8f2d755d0
1 changed files with 5 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue