1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

preg: Unpack winreg_Data for parsing

It seems that there might be pre-existing endianness issues which would be fixed by the ndr_push.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2018-04-16 14:53:18 +12:00 committed by Andrew Bartlett
parent 572fd6319f
commit 463dcc9094
2 changed files with 4 additions and 2 deletions

View File

@ -27,7 +27,7 @@ import "misc.idl";
[charset(DOS),value(";"),noprint] uint8 _sep3[2];
uint32 size;
[charset(DOS),value(";"),noprint] uint8 _sep4[2];
uint8 data[size];
[subcontext(0),subcontext_size(size),flag(NDR_REMAINING), switch_is(type)] winreg_Data data;
[charset(DOS),value("]"),noprint] uint8 _closing_bracket[2];
} preg_entry;

View File

@ -119,7 +119,9 @@ static bool gp_reg_entry_from_file_entry(TALLOC_CTX *mem_ctx,
return false;
data->type = r->type;
data->data = data_blob_talloc(data, r->data, r->size);
ndr_push_union_blob(&data->data, mem_ctx, &r->data, r->type,
(ndr_push_flags_fn_t)ndr_push_winreg_Data);
entry = talloc_zero(mem_ctx, struct gp_registry_entry);
if (!entry)