diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index d0a754f281..48b34755a6 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -9521,6 +9521,15 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ /* housekeeping information in the reply */ + /* Fix from Martin Zielinski <mz@seh.de> - ensure + * the hand marshalled container size is a multiple + * of 4 bytes for RPC alignment. + */ + + if (needed % 4) { + needed += 4-(needed % 4); + } + r_u->needed = needed; r_u->returned = num_entries; @@ -9533,15 +9542,6 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_ r_u->ctr.size = r_u->needed; - /* Fix from Martin Zielinski <mz@seh.de> - ensure - * the hand marshalled container size is a multiple - * of 4 bytes for RPC alignment. - */ - - if (needed % 4) { - r_u->ctr.size += 4-(needed % 4); - } - r_u->ctr.size_of_array = r_u->returned; r_u->ctr.values = enum_values; |