1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

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 0e9ad2b29f)
This commit is contained in:
Jeremy Allison 2007-02-03 00:50:47 +00:00 committed by Gerald (Jerry) Carter
parent 685ca94ac2
commit d4135a3bdb

View File

@ -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;