1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-05 09:17:44 +03:00

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

(cherry picked from commit 82c3a0b74c)
(cherry picked from commit 6e6da09bd0)
This commit is contained in:
Lennart Poettering 2022-07-05 14:10:33 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent 256ce35963
commit aa65f1f24f

View File

@ -49,8 +49,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;
}
@ -66,8 +66,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;
}
}