diff options
author | Tim Potter <tpot@samba.org> | 2003-05-28 00:59:35 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-05-28 00:59:35 +0000 |
commit | fd448442d90e062196d8bb48c01c5ea9ea9263b2 (patch) | |
tree | 99c7c4534f11687ad92d2d9e42b613573791005e | |
parent | 044b9af17ed83490e645c6b7e41862326fd701e9 (diff) | |
download | samba-fd448442d90e062196d8bb48c01c5ea9ea9263b2.tar.gz samba-fd448442d90e062196d8bb48c01c5ea9ea9263b2.tar.bz2 samba-fd448442d90e062196d8bb48c01c5ea9ea9263b2.zip |
Merge of rpcstr_pull() termination fixes from 3.0
(This used to be commit d41705dec6bed752acfe3210c73a949101dc23f6)
-rw-r--r-- | source3/lib/util_unistr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 08bb03986f..5df0828295 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -229,7 +229,10 @@ char *skip_unibuf(char *src, size_t len) */ int rpcstr_pull(char* dest, void *src, int dest_len, int src_len, int flags) { - if (!src) return 0; + if (!src) { + dest[0] = 0; + return 0; + } if(dest_len==-1) dest_len=MAXUNI-3; return pull_ucs2(NULL, dest, src, dest_len, src_len, flags|STR_UNICODE|STR_NOALIGN); } |