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
3 changed files with 9 additions and 0 deletions
+3
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
+1
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()