summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-02-03 00:50:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:41 -0500
commitd4135a3bdbe70bf87632396b79af5b17c7da5dd5 (patch)
tree48c540db45a2ddd0de2c4ac460714ebc5082d5c1
parent685ca94ac24842fddf22e31edc39de40b0729248 (diff)
downloadsamba-d4135a3bdbe70bf87632396b79af5b17c7da5dd5.tar.gz
samba-d4135a3bdbe70bf87632396b79af5b17c7da5dd5.tar.bz2
samba-d4135a3bdbe70bf87632396b79af5b17c7da5dd5.zip
r21129: Fix from Martin Zielinski <mz@seh.de> - ensure
the hand marshalled container size is a multiple of 4 bytes for RPC alignment. Jeremy. (This used to be commit 0e9ad2b29f1c05dc3f5d5e9659fe0557fa077d2e)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 3270801fc2..d0a754f281 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -9532,6 +9532,16 @@ WERROR _spoolss_enumprinterdataex(pipes_struct *p, SPOOL_Q_ENUMPRINTERDATAEX *q_
/* copy data into the reply */
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;