]> git.ipfire.org Git - thirdparty/dbus.git/commit
bus/dir-watch: Do not crash with > 128 dirs
authorJan Tojnar <jtojnar@gmail.com>
Wed, 20 Apr 2022 09:07:25 +0000 (11:07 +0200)
committerSimon McVittie <smcv@collabora.com>
Mon, 19 Sep 2022 09:47:59 +0000 (10:47 +0100)
commit5fd9680e1318977bb6d33a89cebbc8b8a3b66ae4
treec733635fa20101f8d4a52b33290127edcce36d27
parent0a516ae5a777aeab277da106c1ef678fe757ad96
bus/dir-watch: Do not crash with > 128 dirs

Without this running, dbus-daemon with long XDG_DATA_DIRS
will crash on out-of-bounds write:

$ XDG_DATA_DIRS=$(seq  -f "/foo/%g" -s ':' 129) dbus-daemon --session
*** stack smashing detected ***: terminated

(cherry picked from commit b551b3e9737958216a1a9d359150a4110a9d0549)
Backported-from: dbus!302
(cherry picked from commit 9e8fe0718c1abf93e92fcf98c3fe962fc524bfa8)
bus/dir-watch-inotify.c
bus/dir-watch-kqueue.c