summaryrefslogtreecommitdiff
path: root/source3
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
commit10297d8cd3bfdef44ea6fdf4d0520fe6c613108c (patch)
tree37a4b0db8dd7b72853079aa42360db8953e41e3d /source3
parent081b70cd8d625f0d74b6b84e69d35ad01eecac68 (diff)
downloadsamba-10297d8cd3bfdef44ea6fdf4d0520fe6c613108c.tar.gz
samba-10297d8cd3bfdef44ea6fdf4d0520fe6c613108c.tar.bz2
samba-10297d8cd3bfdef44ea6fdf4d0520fe6c613108c.zip
wrong alignment size calculation
spot by Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE> (This used to be commit eda0e7589f2591edc29e6c1eef44aa21628977be)
Diffstat (limited to 'source3')
-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;
}