dsdb: Always store and return the userParameters as a array of LE 16-bit values
commitd7b4d10aba90f4a1acf01d1d5ab62161862f62f7
authorAndrew Bartlett <abartlet@samba.org>
Tue, 17 Jun 2014 04:03:22 +0000 (17 16:03 +1200)
committerStefan Metzmacher <metze@samba.org>
Wed, 9 Jul 2014 06:42:08 +0000 (9 08:42 +0200)
treef1736d58c520166d476bab49cbd1963594853f7d
parent1592eaa5c781af83aa64bc4e7211339e1d1eafce
dsdb: Always store and return the userParameters as a array of LE 16-bit values

This is not allowed to be odd length, as otherwise we can not send it over the SAMR transport correctly.

Allocating one byte less memory than required causes malloc() heap corruption
and then a crash or lockup of the SAMR server.

Andrew Bartlett

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10130
Change-Id: I5c0c531c1d660141e07f884a4789ebe11c1716f6
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/passdb/pdb_samba_dsdb.c
source4/dsdb/common/util.c
source4/rpc_server/samr/dcesrv_samr.c