From: Ralph Boehme Date: Fri, 3 May 2019 20:52:33 +0000 (+0200) Subject: s3:mdssvc: marshalling: fix unpacking empty CNID structure X-Git-Tag: tdb-1.4.2~216 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=29ef0306241da38356ffa1ee927e1b343564426e;p=thirdparty%2Fsamba.git s3:mdssvc: marshalling: fix unpacking empty CNID structure Pass the correct tag member tag.size to sl_unpack_CNID(), not tag.length. tag.size is the size actually used in a buffer of size tag.length. Cf other users of tag.size that already do this correctly, this was only wrong in this place. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/rpc_server/mdssvc/marshalling.c b/source3/rpc_server/mdssvc/marshalling.c index 7f5f95e836d..8fa7f173228 100644 --- a/source3/rpc_server/mdssvc/marshalling.c +++ b/source3/rpc_server/mdssvc/marshalling.c @@ -1037,7 +1037,7 @@ static ssize_t sl_unpack_cpx(DALLOC_CTX *query, } result = sl_unpack_CNID(query, buf, offset, bufsize, - tag.length, encoding); + tag.size, encoding); if (result == -1) { return -1; }