summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_misc.c2
-rw-r--r--source3/rpc_parse/parse_spoolss.c11
2 files changed, 13 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 93f47bbc7a..859a800771 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -494,6 +494,8 @@ void init_unistr(UNISTR *str, const char *buf)
if (str->buffer == NULL)
smb_panic("init_unistr: malloc fail\n");
+ memset(str->buffer, '\0', len);
+
/* store the string (null-terminated copy) */
dos_struni2((char *)str->buffer, buf, len);
}
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index eaacb52f5b..d77cd938a8 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -4340,6 +4340,10 @@ 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 0
+ if(!prs_uint32("dummy4", ps, depth, &il->dummy4))
+ return False;
+#endif
if(!prs_uint32("name_ptr", ps, depth, &il->name_ptr))
return False;
if(!prs_uint32("environment_ptr", ps, depth, &il->environment_ptr))
@@ -4385,30 +4389,37 @@ BOOL spool_io_printer_driver_info_level_6(char *desc, SPOOL_PRINTER_DRIVER_INFO_
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("environment", &il->environment, il->environment_ptr, ps, depth))
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("driverpath", &il->driverpath, il->driverpath_ptr, ps, depth))
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("datafile", &il->datafile, il->datafile_ptr, ps, depth))
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("configfile", &il->configfile, il->configfile_ptr, ps, depth))
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("helpfile", &il->helpfile, il->helpfile_ptr, ps, depth))
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("monitorname", &il->monitorname, il->monitorname_ptr, ps, depth))
return False;
if(!prs_align(ps))
return False;
+
if(!smb_io_unistr2("defaultdatatype", &il->defaultdatatype, il->defaultdatatype_ptr, ps, depth))
return False;
if(!prs_align(ps))