librpc/ndr: make push_charset_to_null UTF-16 safe (CID 1399648)
commitc737b61cb46cace806e634ec3b852546609acd93
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 8 May 2019 02:09:56 +0000 (8 14:09 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Thu, 9 May 2019 22:39:27 +0000 (9 22:39 +0000)
treea0293d8c93f5709c1d9bfbe4c967f4eaa35aa99f
parent47f2264c5e40ca283708310b1b28f03fad6a21a7
librpc/ndr: make push_charset_to_null UTF-16 safe (CID 1399648)

The length is in test units, not bytes, and includes terminating
nulls. For 16-bit character sets, the terminating null must be two
bytes.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
librpc/ndr/ndr_string.c