s3:mdssvc: marshalling: fix unpacking empty CNID structure
authorRalph Boehme <slow@samba.org>
Fri, 3 May 2019 20:52:33 +0000 (22:52 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 8 Aug 2019 20:24:32 +0000 (20:24 +0000)
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 <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/rpc_server/mdssvc/marshalling.c

index 7f5f95e836de2360797a83e6e70f3f91083997fa..8fa7f1732285192924e2d14bbcd075fdfe9977ec 100644 (file)
@@ -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;
                }