summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_spoolss.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 868d90ae74..0961cda195 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -4361,17 +4361,20 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_
if(!prs_uint32("version", ps, depth, &il->version))
return False;
- if (il->version != 0) {
- /*
- * If version != 0 then there are an extra 4 bytes.
- * JohnR and I have verified this at Roseville... JRA.
- */
- if(!prs_uint32("dummy4", ps, depth, &il->dummy4))
- return False;
- }
if(!prs_uint32("name_ptr", ps, depth, &il->name_ptr))
- return False;
+ return False;
+ /*
+ * If name_ptr is NULL then the next 4 bytes are the name_ptr. A driver
+ * with a NULL name just isn't a driver For example: "HP LaserJet 4si"
+ * from W2K CDROM (which uses unidriver). JohnR 010205
+ */
+ if (!il->name_ptr) {
+ DEBUG(5,("spool_io_printer_driver_info_level_6: name_ptr is NULL! Get next value\n"));
+ if(!prs_uint32("name_ptr", ps, depth, &il->name_ptr))
+ return False;
+ }
+
if(!prs_uint32("environment_ptr", ps, depth, &il->environment_ptr))
return False;
if(!prs_uint32("driverpath_ptr", ps, depth, &il->driverpath_ptr))