diff options
author | Gerald Carter <jerry@samba.org> | 2000-08-10 14:03:13 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2000-08-10 14:03:13 +0000 |
commit | 7ce5aacf7e18a61baff14ada94cb626acb446426 (patch) | |
tree | f06eaf14f95db5a5a20669cd4cb18ae9f3278602 /source3 | |
parent | 60084f52715505829a16c2d41f11aeed4d74ba45 (diff) | |
download | samba-7ce5aacf7e18a61baff14ada94cb626acb446426.tar.gz samba-7ce5aacf7e18a61baff14ada94cb626acb446426.tar.bz2 samba-7ce5aacf7e18a61baff14ada94cb626acb446426.zip |
working on the unmarshalling of dependentfiles to a DRIVER_INFO_3
struct. Not wuite there.
jerry
(This used to be commit 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 11 |
1 files changed, 9 insertions, 2 deletions
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); |