1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

sd-id128: don't allow chars > f in valid id128 values

This commit is contained in:
Lennart Poettering 2022-07-05 14:10:33 +02:00
parent d486b26fe3
commit 82c3a0b74c

View File

@ -26,8 +26,8 @@ bool id128_is_valid(const char *s) {
char c = s[i];
if (!(c >= '0' && c <= '9') &&
!(c >= 'a' && c <= 'z') &&
!(c >= 'A' && c <= 'Z'))
!(c >= 'a' && c <= 'f') &&
!(c >= 'A' && c <= 'F'))
return false;
}
@ -43,8 +43,8 @@ bool id128_is_valid(const char *s) {
return false;
} else {
if (!(c >= '0' && c <= '9') &&
!(c >= 'a' && c <= 'z') &&
!(c >= 'A' && c <= 'Z'))
!(c >= 'a' && c <= 'f') &&
!(c >= 'A' && c <= 'F'))
return false;
}
}