librpc: Avoid spinning on string_array elements with a short input
authorAndrew Bartlett <abartlet@samba.org>
Thu, 7 Nov 2019 01:19:24 +0000 (14:19 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 4 Dec 2019 05:10:31 +0000 (05:10 +0000)
commitd15a3797c7949140c872e82cc42d4f7301a9bf82
treea8b21307045c2c68315a219cade6cd4cf042e79a
parentbf8063e369a227eecc902f90277fc59d9d0ad167
librpc: Avoid spinning on string_array elements with a short input

Without this protection we will spin during decode of a string_array or nstring_array
that is terminated by only a single NUL byte, not two as required by UTF-16.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13874

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
librpc/ndr/ndr_string.c
selftest/knownfail.d/bug-13874 [deleted file]