replace: Don't run over dst in strlcat
authorVolker Lendecke <vl@samba.org>
Thu, 28 Nov 2013 08:33:59 +0000 (09:33 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Thu, 28 Nov 2013 11:33:10 +0000 (12:33 +0100)
commit13550a2b5eed57084a5d9671d9493a9a2e08d7e3
treee58b908a3036b343d117b4e3ee69ffdc9862dd31
parente2db9c524f40f8771ae19b2be47a56f7a9d887af
replace: Don't run over dst in strlcat

If "d" is not 0-terminated, the pure strlen will read beyond the end
of the given bufsize. strlcat in libbsd deliberately avoids this, so we
should do the same.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
lib/replace/replace.c