summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-12-20 15:09:23 +0000
committerGerald Carter <jerry@samba.org>2001-12-20 15:09:23 +0000
commitf7e4e37c63044c378a1ea624304b331c9c443fc9 (patch)
tree29eb1a4fc77dabb6bf91d33478789199a329ae4b
parentdf8992b94c500e34868757223b643243841076df (diff)
downloadsamba-f7e4e37c63044c378a1ea624304b331c9c443fc9.tar.gz
samba-f7e4e37c63044c378a1ea624304b331c9c443fc9.tar.bz2
samba-f7e4e37c63044c378a1ea624304b331c9c443fc9.zip
merge from 2.2
(This used to be commit 72d3b160229ce9ab8497579ee79668738a70a81f)
-rw-r--r--source3/rpc_parse/parse_spoolss.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index f6d629f857..14e22c4195 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -6368,6 +6368,7 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
uint32 valuename_offset,
data_offset,
current_offset;
+ const uint32 basic_unit = 20; /* size of static portion of enum_values */
prs_debug(ps, depth, desc, "spoolss_io_printer_enum_values_ctr");
depth++;
@@ -6375,10 +6376,9 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
if (!prs_uint32("size", ps, depth, &ctr->size))
return False;
- /* offset data begins at 20 bytes per structure * size_of_array.
- Don't forget the uint32 at the beginning */
+ /* offset data begins at 20 bytes per structure * size_of_array. */
- current_offset = 4 + (20*ctr->size_of_array);
+ current_offset = basic_unit * ctr->size_of_array;
/* first loop to write basic enum_value information */
@@ -6401,13 +6401,13 @@ static BOOL spoolss_io_printer_enum_values_ctr(char *desc, prs_struct *ps,
if (!prs_uint32("data_len", ps, depth, &ctr->values[i].data_len))
return False;
- current_offset = data_offset + ctr->values[i].data_len;
+ current_offset = data_offset + ctr->values[i].data_len - basic_unit;
}
/* loop #2 for writing the dynamically size objects
- while viewing oncversations between Win2k -> Win2k,
- 4-byte alignment does not seem to matter here --jerrty */
+ while viewing conversations between Win2k -> Win2k,
+ 4-byte alignment does not seem to matter here --jerry */
for (i=0; i<ctr->size_of_array; i++)
{