From bd4c83eb40a14baf447ac88886d4eafe7b9a309f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 14 Aug 2000 21:18:02 +0000 Subject: 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. --- source/rpc_parse/parse_spoolss.c | 7 +++++-- 1 file 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)) -- cgit