summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2002-09-13 08:53:53 +0000
committerSimo Sorce <idra@samba.org>2002-09-13 08:53:53 +0000
commiteda0e7589f2591edc29e6c1eef44aa21628977be (patch)
treeb64885ff781556c7fa483f2f45b6ef40aa831be9
parentd153d692a0f8499e1d6dac791a4d119cd9c15e45 (diff)
downloadsamba-eda0e7589f2591edc29e6c1eef44aa21628977be.tar.gz
samba-eda0e7589f2591edc29e6c1eef44aa21628977be.tar.xz
samba-eda0e7589f2591edc29e6c1eef44aa21628977be.zip
wrong alignment size calculation
spot by Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>
-rw-r--r--source/rpc_parse/parse_spoolss.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c
index 55c387cdc51..36b00ff55db 100644
--- a/source/rpc_parse/parse_spoolss.c
+++ b/source/rpc_parse/parse_spoolss.c
@@ -3366,7 +3366,9 @@ uint32 spoolss_size_printer_info_2(PRINTER_INFO_2 *info)
* it is easier to maintain the calculation here and
* not place the burden on the caller to remember. --jerry
*/
- size += size % 4;
+ if ((size % 4) != 0) {
+ size += 4 - (size % 4);
+ }
return size;
}