mirror of
https://github.com/systemd/systemd.git
synced 2025-01-07 21:18:41 +03:00
util-lib: reject too long path for timedate_is_valid()
This should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8827.
This commit is contained in:
parent
b05ecb8cad
commit
1c73b60b4d
@ -1311,6 +1311,9 @@ bool timezone_is_valid(const char *name, int log_level) {
|
||||
if (slash)
|
||||
return false;
|
||||
|
||||
if (p - name >= PATH_MAX)
|
||||
return false;
|
||||
|
||||
t = strjoina("/usr/share/zoneinfo/", name);
|
||||
|
||||
fd = open(t, O_RDONLY|O_CLOEXEC);
|
||||
|
Loading…
Reference in New Issue
Block a user