Null terminate before (or after) strncpy(3)
authorTomohiro Kusumi <kusumi.tomohiro@gmail.com>
Fri, 29 Jul 2016 15:05:59 +0000 (00:05 +0900)
committerJens Axboe <axboe@fb.com>
Fri, 29 Jul 2016 15:01:22 +0000 (09:01 -0600)
commit087d0ed0d9b5b763e3bd50ad225b3b25897904bb
tree5a8b8efdf559b7310e5008d56f0c110096843854
parentdb815fb3d7e158665179a31819929bcfba3156de
Null terminate before (or after) strncpy(3)

These three strncpy() calls copy at most sizeof(buffer)-1 bytes,
but buffer isn't explicitly 0 cleared, so 0 terminate the last byte.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
diskutil.c
ioengines.c