Fix logic in ldr_ro_manager
Fix argument type for isdigit/isxdigit
This commit is contained in:
@@ -1577,10 +1577,10 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
|
||||
digit = *(str + 1);
|
||||
|
||||
if (!digit
|
||||
|| (base == 16 && !isxdigit(digit))
|
||||
|| (base == 10 && !isdigit(digit))
|
||||
|| (base == 8 && (!isdigit(digit) || digit > '7'))
|
||||
|| (base == 0 && !isdigit(digit)))
|
||||
|| (base == 16 && !isxdigit((unsigned char)digit))
|
||||
|| (base == 10 && !isdigit((unsigned char)digit))
|
||||
|| (base == 8 && (!isdigit((unsigned char)digit) || digit > '7'))
|
||||
|| (base == 0 && !isdigit((unsigned char)digit)))
|
||||
break;
|
||||
|
||||
switch (qualifier) {
|
||||
|
||||
@@ -176,7 +176,7 @@ static inline uint8_t hex_nybble_to_u8(const char nybble) {
|
||||
static bool name_matches_hash(const char *name, size_t name_len, const void *hash, size_t hash_size) {
|
||||
/* Validate name is hex build id. */
|
||||
for (unsigned int i = 0; i < name_len - 4; i++) {
|
||||
if (isxdigit(name[i]) == 0) {
|
||||
if (isxdigit((unsigned char)name[i]) == 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user