From 7ed3fcad2a75d89c5d7272e2aab8fe3a7f9cd943 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. (This used to be commit bd4c83eb40a14baf447ac88886d4eafe7b9a309f) --- source3/rpc_parse/parse_spoolss.c | 7 +++++-- 1 file 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)) -- cgit