HP2500C driver writes devmode with private data that ends
authorJeremy Allison <jra@samba.org>
Thu, 11 Apr 2002 18:52:09 +0000 (18:52 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 11 Apr 2002 18:52:09 +0000 (18:52 +0000)
on a 2 byte boundary. We then miss-parse the desired_access. Also added
other fixes to ensure we align after private data (discussed with Gerry).
Jeremy.
(This used to be commit 4369a58765f382e118e5393c805336484671cbf9)

source3/rpc_parse/parse_spoolss.c

index 1cbb97c337c04f911d537d40992dbd19e676d16c..b74ee3c5c589f41b763b4a556fcd02a70085b3cc 100644 (file)
@@ -746,6 +746,9 @@ static BOOL spoolss_io_printer_default(char *desc, PRINTER_DEFAULT *pd, prs_stru
        if (!spoolss_io_devmode_cont("", &pd->devmode_cont, ps, depth))
                return False;
 
+       if (!prs_align(ps))
+               return False;
+
        if (!prs_uint32("access_required", ps, depth, &pd->access_required))
                return False;
 
@@ -3832,6 +3835,9 @@ BOOL spoolss_io_q_setprinter(char *desc, SPOOL_Q_SETPRINTER *q_u, prs_struct *ps
        if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
                return False;
        
+       if(!prs_align(ps))
+               return False;
+
        switch (q_u->level)
        {
                case 2:
@@ -4623,6 +4629,9 @@ BOOL spoolss_io_q_addprinterex(char *desc, SPOOL_Q_ADDPRINTEREX *q_u, prs_struct
        if (!spoolss_io_devmode_cont(desc, &q_u->devmode_ctr, ps, depth))
                return False;
 
+       if(!prs_align(ps))
+               return False;
+
        switch (q_u->level) {
                case 2:
                        ptr_sec_desc = q_u->info.info_2->secdesc_ptr;