Avoid reading pass the end of the source buffer when it is not NUL
authorbrooks <brooks@FreeBSD.org>
Wed, 13 Jan 2016 21:50:08 +0000 (21:50 +0000)
committerbrooks <brooks@FreeBSD.org>
Wed, 13 Jan 2016 21:50:08 +0000 (21:50 +0000)
commite7eafcf596a620c405dc5f6d34749551cb2ab1e3
treeece8b5f7337e9a78c483e4734eca8510a53d2a5e
parent50e4d892f3dd2bd28cc668736311dd1a3ad2a22d
Avoid reading pass the end of the source buffer when it is not NUL
terminated.

If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.

PR: 206178
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
MFC after: 1 week
lib/libc/string/wcslcat.c