summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_parse/parse_prs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index e348ef460d..d97b1b0dff 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1816,8 +1816,11 @@ return the contents of a prs_struct in a DATA_BLOB
********************************************************************/
BOOL prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
{
- blob->length = prs_offset(prs);
+ blob->length = prs_data_size(prs);
blob->data = (uint8 *)talloc_zero_size(mem_ctx, blob->length);
+
+ /* set the pointer at the end of the buffer */
+ prs_set_offset( prs, prs_data_size(prs) );
if (!prs_copy_all_data_out((char *)blob->data, prs))
return False;