From 7ce5aacf7e18a61baff14ada94cb626acb446426 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 10 Aug 2000 14:03:13 +0000 Subject: working on the unmarshalling of dependentfiles to a DRIVER_INFO_3 struct. Not wuite there. jerry (This used to be commit 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb) --- source3/rpc_parse/parse_spoolss.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3/rpc_parse/parse_spoolss.c') diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 20660a9710..1a16d7ca9f 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -1484,6 +1484,10 @@ static BOOL spoolss_smb_io_unistr(char *desc, UNISTR *uni, prs_struct *ps, int d prs_debug(ps, depth, desc, "spoolss_smb_io_unistr"); depth++; + + if (!prs_align(ps)) + return False; + if (!prs_unistr("unistr", ps, depth, uni)) return False; @@ -1642,8 +1646,11 @@ static BOOL new_smb_io_relarraystr(char *desc, NEW_BUFFER *buffer, int depth, ui l_chaine=str_len_uni(&chaine); if((chaine2=(uint16 *)Realloc(chaine2, (l_chaine2+l_chaine+1)*sizeof(uint16))) == NULL) return False; - memcpy(chaine2+l_chaine2, chaine.buffer, (l_chaine+1)*sizeof(uint16)); - l_chaine2+=l_chaine+1; + if (l_chaine > 0) + { + memcpy(chaine2+l_chaine2, chaine.buffer, (l_chaine+1)*sizeof(uint16)); + l_chaine2+=l_chaine+1; + } } while(l_chaine!=0); -- cgit