summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-08-14 21:18:02 +0000
committerGerald Carter <jerry@samba.org>2000-08-14 21:18:02 +0000
commit7ed3fcad2a75d89c5d7272e2aab8fe3a7f9cd943 (patch)
tree5af94ade1f6ac5188a75d3a2dc80f67d7beb0c88 /source3
parentb5f75af6f983adce83da537d2cc0d3c6278efec4 (diff)
downloadsamba-7ed3fcad2a75d89c5d7272e2aab8fe3a7f9cd943.tar.gz
samba-7ed3fcad2a75d89c5d7272e2aab8fe3a7f9cd943.tar.bz2
samba-7ed3fcad2a75d89c5d7272e2aab8fe3a7f9cd943.zip
fixed a few bugs in new_smb_io_relarraystr().
Marshalling code path now uses spoolss_smb_io_unistr() also caught a NULL pointer case. i'll update TNG later. (This used to be commit bd4c83eb40a14baf447ac88886d4eafe7b9a309f)
Diffstat (limited to 'source3')
-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))