The buffer passed to an sbuf drain callback is not necessarily

null-terminated, so don't assume that it is.

Reported by:	pho
X-MFC-With:	r291059
This commit is contained in:
markj 2015-11-23 18:45:35 +00:00
parent e1cab9dbc2
commit 9b7d03a6f4

View File

@ -2987,7 +2987,7 @@ static int
witness_output_drain(void *arg __unused, const char *data, int len)
{
witness_output("%s", data);
witness_output("%.*s", len, data);
return (len);
}