Merge pull request #9253 from yuwata/fix-timezone_is_valid
util-lib: reject too long path for timedate_is_valid()
This commit is contained in:
commit
d9cd8ee65a
|
@ -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);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -27,4 +27,5 @@ fuzz_regression_tests = '''
|
|||
fuzz-unit-file/oss-fuzz-6977
|
||||
fuzz-unit-file/oss-fuzz-7004
|
||||
fuzz-unit-file/oss-fuzz-8064
|
||||
fuzz-unit-file/oss-fuzz-8827
|
||||
'''.split()
|
||||
|
|
Loading…
Reference in New Issue