mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
r18393: get the data size and not offset when initializing a data blob from a prs structure
(This used to be commit 878fd68dfcb237f5332efcf48a3891abcc9ad53c)
This commit is contained in:
parent
703881988b
commit
8fad1d204e
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user