dsdb: Always store and return the userParameters as a array of LE 16-bit values
commit75eaf99d06aaa193873d3164615538e78fed6e80
authorAndrew Bartlett <abartlet@samba.org>
Tue, 17 Jun 2014 04:03:22 +0000 (17 16:03 +1200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 15 Jul 2014 10:46:16 +0000 (15 12:46 +0200)
tree2e6afbc22f7ec742e85bd724f072a2c5434cf46d
parent50b6474fd1b15450c410262d97af94214d8187be
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>
(cherry picked from commit d7b4d10aba90f4a1acf01d1d5ab62161862f62f7)
source3/passdb/pdb_samba_dsdb.c
source4/dsdb/common/util.c
source4/rpc_server/samr/dcesrv_samr.c