summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_parse/parse_spoolss.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 1b565cb2d9..fe8e9c85ca 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -1614,7 +1614,7 @@ static BOOL new_smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, ui
}
/* write the string */
- if (!smb_io_unistr(desc, &chaine, ps, depth)) {
+ if (!spoolss_smb_io_unistr(desc, &chaine, ps, depth)) {
free(chaine.buffer);
return False;
}
@@ -1669,7 +1669,10 @@ static BOOL new_smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, ui
/* the end should be bould NULL terminated so add
the second one here */
- chaine2[l_chaine2] = '\0';
+ if (chaine2)
+ {
+ chaine2[l_chaine2] = '\0';
+ }
*string=chaine2;
if(!prs_set_offset(ps, old_offset))