summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-11 19:32:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:51:21 -0500
commit8fad1d204edd6c10380bfa5d72ec7060e34ccdb9 (patch)
treee6ad328013e3876774a148a71113bae186c40a1d
parent703881988bfa825fcaec0739904d9648c5ade29e (diff)
downloadsamba-8fad1d204edd6c10380bfa5d72ec7060e34ccdb9.tar.gz
samba-8fad1d204edd6c10380bfa5d72ec7060e34ccdb9.tar.bz2
samba-8fad1d204edd6c10380bfa5d72ec7060e34ccdb9.zip
r18393: get the data size and not offset when initializing a data blob from a prs structure
(This used to be commit 878fd68dfcb237f5332efcf48a3891abcc9ad53c)
-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;