]> git.ipfire.org Git - thirdparty/util-linux.git/commit
write: use xstrncpy() from strutils.h
authorSami Kerola <kerolasa@iki.fi>
Fri, 6 May 2016 23:20:32 +0000 (00:20 +0100)
committerSami Kerola <kerolasa@iki.fi>
Fri, 1 Jul 2016 19:59:23 +0000 (20:59 +0100)
commite4aaa0e5932e12671d209a5fcf60f4775b7820a8
treefdb8de1be2d4a688258e10c29b655a7e2f779745
parent489a0fd2f55b2bb0aefeef8a9a1514cf63ea8342
write: use xstrncpy() from strutils.h

Earlier if the tty path was exactly length of the maximum ut_line then last
character of the path was overwrote by \0.  This is in practise theoretical
bug, as it is unheard that a tty device path could be 32 characters long.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
term-utils/write.c