diff options
author | Gerald Carter <jerry@samba.org> | 2000-08-14 21:18:02 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-08-14 21:18:02 +0000 |
commit | bd4c83eb40a14baf447ac88886d4eafe7b9a309f (patch) | |
tree | c5cff34006a9f640eaa4f61488af04e2106a7aec | |
parent | 9af82423d2e5c6f873a906097a56c8ac6c5f8297 (diff) | |
download | samba-bd4c83eb40a14baf447ac88886d4eafe7b9a309f.tar.gz samba-bd4c83eb40a14baf447ac88886d4eafe7b9a309f.tar.xz samba-bd4c83eb40a14baf447ac88886d4eafe7b9a309f.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.
-rw-r--r-- | source/rpc_parse/parse_spoolss.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 1b565cb2d90..fe8e9c85cac 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/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)) |