wrong alignment size calculation
authorSimo Sorce <idra@samba.org>
Fri, 13 Sep 2002 08:53:53 +0000 (08:53 +0000)
committerSimo Sorce <idra@samba.org>
Fri, 13 Sep 2002 08:53:53 +0000 (08:53 +0000)
spot by Florian Weimer <Weimer@CERT.Uni-Stuttgart.DE>

source/rpc_parse/parse_spoolss.c

index 55c387cdc51d9b05d10d0c5dd06011573db8ed9d..36b00ff55db76adaffaa5a1f4f7f7ba0010934c7 100644 (file)
@@ -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;
 }