summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_parse/parse_spoolss.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 55c387cdc5..36b00ff55d 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/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;
}