summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-02-11 18:54:31 +0100
committerStefan Metzmacher <metze@samba.org>2010-02-18 13:44:00 +0100
commitbfd6edb3e9339d602eb6514ff50c3bb6c671174e (patch)
treee0bdfbb12335fe7a2f438ee49bebfd70fb91d851
parentc869328b1642043480f9600c88bcce9da37959b1 (diff)
downloadsamba-bfd6edb3e9339d602eb6514ff50c3bb6c671174e.tar.gz
samba-bfd6edb3e9339d602eb6514ff50c3bb6c671174e.tar.bz2
samba-bfd6edb3e9339d602eb6514ff50c3bb6c671174e.zip
spoolss: fix relative pointers in ndr_push_spoolss_DriverInfo101.
Guenther
-rw-r--r--librpc/ndr/ndr_spoolss_buf.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index c5ee305cb0..0012ce3e2a 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -929,8 +929,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->driver_name) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
}
ndr->flags = _flags_save_string;
}
@@ -938,13 +939,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->architecture) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->architecture));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->architecture));
}
ndr->flags = _flags_save_string;
}
if (r->file_info) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->file_info));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->file_info));
#if 0
NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->file_count));
#endif
@@ -954,13 +956,15 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
for (cntr_file_info_1 = 0; cntr_file_info_1 < r->file_count; cntr_file_info_1++) {
NDR_CHECK(ndr_push_spoolss_DriverFileInfo(ndr, NDR_BUFFERS, &r->file_info[cntr_file_info_1]));
}
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->file_info));
}
{
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->monitor_name) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->monitor_name));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->monitor_name));
}
ndr->flags = _flags_save_string;
}
@@ -968,8 +972,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->default_datatype) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->default_datatype));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->default_datatype));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->default_datatype));
}
ndr->flags = _flags_save_string;
}
@@ -977,8 +982,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string_array = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->previous_names) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->previous_names));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->previous_names));
NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->previous_names));
}
ndr->flags = _flags_save_string_array;
}
@@ -986,8 +992,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->manufacturer_name) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->manufacturer_name));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->manufacturer_name));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_name));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->manufacturer_name));
}
ndr->flags = _flags_save_string;
}
@@ -995,8 +1002,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->manufacturer_url) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->manufacturer_url));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->manufacturer_url));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_url));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->manufacturer_url));
}
ndr->flags = _flags_save_string;
}
@@ -1004,8 +1012,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->hardware_id) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->hardware_id));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->hardware_id));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->hardware_id));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->hardware_id));
}
ndr->flags = _flags_save_string;
}
@@ -1013,8 +1022,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr,
uint32_t _flags_save_string = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
if (r->provider) {
- NDR_CHECK(ndr_push_relative_ptr2(ndr, r->provider));
+ NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->provider));
NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->provider));
+ NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->provider));
}
ndr->flags = _flags_save_string;
}