From 10297d8cd3bfdef44ea6fdf4d0520fe6c613108c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 13 Sep 2002 08:53:53 +0000 Subject: wrong alignment size calculation spot by Florian Weimer (This used to be commit eda0e7589f2591edc29e6c1eef44aa21628977be) --- source3/rpc_parse/parse_spoolss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/rpc_parse') 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; } -- cgit