initd: fix off-by-one error in mkdev.c
authorDaniel Golle <daniel@makrotopia.org>
Mon, 30 Aug 2021 21:20:30 +0000 (22:20 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 30 Aug 2021 21:22:16 +0000 (22:22 +0100)
commit8eb1d783cca6e0d501dd3a2f94262ffc36ae6482
tree61a42502c5ceb2c3a0ae363a2b77b3e4259b7201
parent96d8bf2c7b6773636efb8b175993e5d17ff7d0bf
initd: fix off-by-one error in mkdev.c

Actually make sure buffer is 0-terminated intead of writing the 0-byte
out of bounds.

Coverity CID: 1330087 Readlink used insecurely
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
initd/mkdev.c