From 8fad1d204edd6c10380bfa5d72ec7060e34ccdb9 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 11 Sep 2006 19:32:55 +0000 Subject: r18393: get the data size and not offset when initializing a data blob from a prs structure (This used to be commit 878fd68dfcb237f5332efcf48a3891abcc9ad53c) --- source3/rpc_parse/parse_prs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3') 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; -- cgit