diff options
author | Gerald Carter <jerry@samba.org> | 2001-12-20 15:09:23 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2001-12-20 15:09:23 +0000 |
commit | 72d3b160229ce9ab8497579ee79668738a70a81f (patch) | |
tree | 5937b58eb0c72b81aae3ad264e868460ca1261bb | |
parent | 5ed31faeb1f3cddc0e61acc63f96119e26f2b529 (diff) | |
download | samba-72d3b160229ce9ab8497579ee79668738a70a81f.tar.gz samba-72d3b160229ce9ab8497579ee79668738a70a81f.tar.xz samba-72d3b160229ce9ab8497579ee79668738a70a81f.zip |
merge from 2.2
-rw-r--r-- | source/rpc_parse/parse_spoolss.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index f6d629f857b..14e22c4195b 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/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++) { |