projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b05ecb8
)
util-lib: reject too long path for timedate_is_valid()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 11 Jun 2018 03:31:02 +0000
(12:31 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 11 Jun 2018 03:38:34 +0000
(12:38 +0900)
This should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8827.
src/basic/time-util.c
patch
|
blob
|
history
diff --git
a/src/basic/time-util.c
b/src/basic/time-util.c
index
031b871
..
64ee777
100644
(file)
--- a/
src/basic/time-util.c
+++ b/
src/basic/time-util.c
@@
-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);