s3:auth:sam_password_ok: fix allocation of a data blob.
authorMichael Adam <obnox@samba.org>
Wed, 30 Dec 2009 14:37:23 +0000 (15:37 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 25 Jan 2010 11:41:57 +0000 (12:41 +0100)
commitc3bd0b5951f09f102abaa19fb2e1f55711b975d2
tree7dae995160d3c6e8f6055a1b12dd6dc29c96c293
parent761a8b8fa5b5d05d5802fecf07229de40d33c558
s3:auth:sam_password_ok: fix allocation of a data blob.

data_blob(mem_ctx, 16) does not use mem_ctx as a talloc ctx but
copies 16 bytes from mem_ctx into the newly allocated data blob.
This can not have been intentional. A blank uint8_t array of
length 16 is allocated by passing NULL instead of mem_ctx.
And using data_blob_talloc(mem_ctx, NULL, 16) adds the allocated
blank 16 byte array to mem_ctx - so this is what must have been
intended.

Michael
source3/auth/auth_sam.c