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 | 1a145977f09654fc51ebcd40ef7a2aa69aa96cfb (patch) | |
tree | d2c1f14f259403bd6c73e9da708d20e92ab7c228 | |
parent | 4bc5b8aa345b963e1247c6a364ba48a08fbd9764 (diff) | |
download | samba-1a145977f09654fc51ebcd40ef7a2aa69aa96cfb.tar.gz samba-1a145977f09654fc51ebcd40ef7a2aa69aa96cfb.tar.xz samba-1a145977f09654fc51ebcd40ef7a2aa69aa96cfb.zip |
working on the unmarshalling of dependentfiles to a DRIVER_INFO_3
struct. Not wuite there.
jerry
-rw-r--r-- | source/rpc_parse/parse_spoolss.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/source/rpc_parse/parse_spoolss.c b/source/rpc_parse/parse_spoolss.c index 20660a97106..1a16d7ca9f0 100644 --- a/source/rpc_parse/parse_spoolss.c +++ b/source/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); |