Brooks Davis 8439a7220d Fix an out-of-bounds write when a zero-length buffer is passed.
Found with ttyname_test and CHERI bounds checking.

Reviewed by:	emaste
Obtained from:	CheriBSD
MFC after:	1 week
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D10377
2017-04-13 15:52:45 +00:00
..
2017-03-28 10:39:17 +00:00
2017-02-28 23:42:47 +00:00
2017-01-30 23:00:51 +00:00
2016-11-11 23:28:07 +00:00
2017-02-28 23:42:47 +00:00
2016-11-20 06:10:12 +00:00
2017-03-11 00:08:11 +00:00
2017-04-07 06:06:55 +00:00
2017-02-27 00:10:00 +00:00
2017-03-19 00:51:12 +00:00
2017-02-14 13:35:59 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
2017-01-28 23:51:03 +00:00