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:
Zbigniew Jędrzejewski-Szmek 2018-06-11 09:12:21 +02:00 committed by GitHub
commit d9cd8ee65a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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()