summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/librpc/idl/winreg.idl7
-rw-r--r--source4/torture/rpc/winreg.c8
2 files changed, 3 insertions, 12 deletions
diff --git a/source4/librpc/idl/winreg.idl b/source4/librpc/idl/winreg.idl
index ca68669ac7..2948b28b73 100644
--- a/source4/librpc/idl/winreg.idl
+++ b/source4/librpc/idl/winreg.idl
@@ -130,11 +130,8 @@
);
typedef struct {
- /* we can't use value(strlen_m(name)*2) here as it
- doesn't propogate to the length_is() property
- below. Jelmer, can this be fixed? */
- uint16 length;
- uint16 size;
+ [value(strlen_m(name)*2)] uint16 length;
+ [value(strlen_m(name)*2)] uint16 size;
[size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name;
} winreg_StringBuf;
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index a784337fb9..b0c2605bae 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -402,9 +402,7 @@ static BOOL test_EnumKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing EnumKey\n\n");
- class.length = 0;
- class.size = 0;
- class.name = NULL;
+ class.name = "";
r.in.handle = handle;
r.in.enum_index = 0;
@@ -414,8 +412,6 @@ static BOOL test_EnumKey(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.last_changed_time = &t;
do {
- name.length = 0;
- name.size = 1024;
name.name = NULL;
status = dcerpc_winreg_EnumKey(p, mem_ctx, &r);
@@ -536,8 +532,6 @@ static BOOL test_EnumValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("testing EnumValue\n");
- name.length = 0;
- name.size = 1024;
name.name = "";
r.in.handle = handle;