initd: fix off-by-one error in mkdev.c
authorNick Hainke <vincent@systemli.org>
Tue, 31 Aug 2021 09:09:19 +0000 (11:09 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Tue, 31 Aug 2021 11:24:14 +0000 (12:24 +0100)
commit773e8da41532b23888511cd864fbd251ecadc577
tree424b24a9a7c3c5271aedb3edfd0d76a5a1279444
parent20adf538b33c9b38b7ca3951f3c2ff4192e57660
initd: fix off-by-one error in mkdev.c

Substract 1 from bufsize so len can not be out of bounds. Same
hanling as in "udevtrigger.c" in "sysfs_resolve_link".

Replaces: 8eb1d783
Coverity CID: 1330087 Readlink used insecurely

Signed-off-by: Nick Hainke <vincent@systemli.org>
initd/mkdev.c