summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
Diffstat (limited to 'librpc')
-rw-r--r--librpc/gen_ndr/cli_winreg.c8
-rw-r--r--librpc/gen_ndr/cli_winreg.h4
-rw-r--r--librpc/gen_ndr/ndr_winreg.c24
-rw-r--r--librpc/gen_ndr/winreg.h4
4 files changed, 20 insertions, 20 deletions
diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c
index 426454292e..1c37f51986 100644
--- a/librpc/gen_ndr/cli_winreg.c
+++ b/librpc/gen_ndr/cli_winreg.c
@@ -2743,7 +2743,7 @@ struct tevent_req *rpccli_winreg_QueryValue_send(TALLOC_CTX *mem_ctx,
struct policy_handle *_handle /* [in] [ref] */,
struct winreg_String *_value_name /* [in] [ref] */,
enum winreg_Type *_type /* [in,out] [unique] */,
- uint8_t *_data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
+ uint8_t *_data /* [in,out] [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */,
uint32_t *_data_size /* [in,out] [unique] */,
uint32_t *_data_length /* [in,out] [unique] */)
{
@@ -2823,7 +2823,7 @@ static void rpccli_winreg_QueryValue_done(struct tevent_req *subreq)
*state->orig.out.type = *state->tmp.out.type;
}
if (state->orig.out.data && state->tmp.out.data) {
- memcpy(state->orig.out.data, state->tmp.out.data, (*state->tmp.in.data_size) * sizeof(*state->orig.out.data));
+ memcpy(state->orig.out.data, state->tmp.out.data, (state->tmp.in.data_size?*state->tmp.in.data_size:0) * sizeof(*state->orig.out.data));
}
if (state->orig.out.data_size && state->tmp.out.data_size) {
*state->orig.out.data_size = *state->tmp.out.data_size;
@@ -2869,7 +2869,7 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
struct winreg_String *value_name /* [in] [ref] */,
enum winreg_Type *type /* [in,out] [unique] */,
- uint8_t *data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
+ uint8_t *data /* [in,out] [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */,
uint32_t *data_size /* [in,out] [unique] */,
uint32_t *data_length /* [in,out] [unique] */,
WERROR *werror)
@@ -2904,7 +2904,7 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
*type = *r.out.type;
}
if (data && r.out.data) {
- memcpy(data, r.out.data, (*r.in.data_size) * sizeof(*data));
+ memcpy(data, r.out.data, (r.in.data_size?*r.in.data_size:0) * sizeof(*data));
}
if (data_size && r.out.data_size) {
*data_size = *r.out.data_size;
diff --git a/librpc/gen_ndr/cli_winreg.h b/librpc/gen_ndr/cli_winreg.h
index 2d7ac0c658..bbd9e9a305 100644
--- a/librpc/gen_ndr/cli_winreg.h
+++ b/librpc/gen_ndr/cli_winreg.h
@@ -298,7 +298,7 @@ struct tevent_req *rpccli_winreg_QueryValue_send(TALLOC_CTX *mem_ctx,
struct policy_handle *_handle /* [in] [ref] */,
struct winreg_String *_value_name /* [in] [ref] */,
enum winreg_Type *_type /* [in,out] [unique] */,
- uint8_t *_data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
+ uint8_t *_data /* [in,out] [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */,
uint32_t *_data_size /* [in,out] [unique] */,
uint32_t *_data_length /* [in,out] [unique] */);
NTSTATUS rpccli_winreg_QueryValue_recv(struct tevent_req *req,
@@ -309,7 +309,7 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli,
struct policy_handle *handle /* [in] [ref] */,
struct winreg_String *value_name /* [in] [ref] */,
enum winreg_Type *type /* [in,out] [unique] */,
- uint8_t *data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */,
+ uint8_t *data /* [in,out] [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */,
uint32_t *data_size /* [in,out] [unique] */,
uint32_t *data_length /* [in,out] [unique] */,
WERROR *werror);
diff --git a/librpc/gen_ndr/ndr_winreg.c b/librpc/gen_ndr/ndr_winreg.c
index b2147ef5d9..6f432d37c5 100644
--- a/librpc/gen_ndr/ndr_winreg.c
+++ b/librpc/gen_ndr/ndr_winreg.c
@@ -2484,10 +2484,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
if (r->in.data) {
- NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.data_size));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size?*r->in.data_size:0));
NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.data_length));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, *r->in.data_length));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_length?*r->in.data_length:0));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_length?*r->in.data_length:0));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_size));
if (r->in.data_size) {
@@ -2505,10 +2505,10 @@ _PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, int
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data));
if (r->out.data) {
- NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.data_size));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->out.data_size?*r->out.data_size:0));
NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
- NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.data_length));
- NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, *r->out.data_length));
+ NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->out.data_length?*r->out.data_length:0));
+ NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->out.data_length?*r->out.data_length:0));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_size));
if (r->out.data_size) {
@@ -2608,11 +2608,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int
}
if (r->in.data) {
if (r->in.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, *r->in.data_size));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size?*r->in.data_size:0));
}
if (r->in.data) {
if (r->in.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, *r->in.data_length));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->in.data, r->in.data_length?*r->in.data_length:0));
}
}
if (flags & NDR_OUT) {
@@ -2673,11 +2673,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, int
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
if (r->out.data) {
if (r->out.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
- NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, *r->out.data_size));
+ NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->out.data_size?*r->out.data_size:0));
}
if (r->out.data) {
if (r->out.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
- NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, *r->out.data_length));
+ NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->out.data, r->out.data_length?*r->out.data_length:0));
}
}
return NDR_ERR_SUCCESS;
@@ -2711,7 +2711,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr->depth++;
if (r->in.data) {
if (r->in.data_length == NULL) return;
- ndr_print_array_uint8(ndr, "data", r->in.data, *r->in.data_length);
+ ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_length?*r->in.data_length:0);
}
ndr->depth--;
ndr_print_ptr(ndr, "data_size", r->in.data_size);
@@ -2741,7 +2741,7 @@ _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *nam
ndr->depth++;
if (r->out.data) {
if (r->out.data_length == NULL) return;
- ndr_print_array_uint8(ndr, "data", r->out.data, *r->out.data_length);
+ ndr_print_array_uint8(ndr, "data", r->out.data, r->out.data_length?*r->out.data_length:0);
}
ndr->depth--;
ndr_print_ptr(ndr, "data_size", r->out.data_size);
diff --git a/librpc/gen_ndr/winreg.h b/librpc/gen_ndr/winreg.h
index 7116810708..53d9a35b62 100644
--- a/librpc/gen_ndr/winreg.h
+++ b/librpc/gen_ndr/winreg.h
@@ -362,14 +362,14 @@ struct winreg_QueryValue {
struct policy_handle *handle;/* [ref] */
struct winreg_String *value_name;/* [ref] */
enum winreg_Type *type;/* [unique] */
- uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */
+ uint8_t *data;/* [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */
uint32_t *data_size;/* [unique] */
uint32_t *data_length;/* [unique] */
} in;
struct {
enum winreg_Type *type;/* [unique] */
- uint8_t *data;/* [unique,length_is(*data_length),size_is(*data_size)] */
+ uint8_t *data;/* [unique,range(0,0x4000000),length_is(data_length?*data_length:0),size_is(data_size?*data_size:0)] */
uint32_t *data_size;/* [unique] */
uint32_t *data_length;/* [unique] */
WERROR result;