diff options
author | Tim Potter <tpot@samba.org> | 2003-01-29 02:55:39 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-01-29 02:55:39 +0000 |
commit | 308efc0337edfe6f7eff1d087ee09819497ca7ad (patch) | |
tree | b29df52aa716d1589ac7ce79988e9365742a3697 /source3 | |
parent | 1394248a101b058ed860abe9826be5f71bfe421d (diff) | |
download | samba-308efc0337edfe6f7eff1d087ee09819497ca7ad.tar.gz samba-308efc0337edfe6f7eff1d087ee09819497ca7ad.tar.bz2 samba-308efc0337edfe6f7eff1d087ee09819497ca7ad.zip |
Return 0 instead of crashing when a NULL source string is passed
to rpcstr_pull()
(This used to be commit b9c4cc119588d6a564f0aaf12fd2ef867a42aeb8)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_unistr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c index 8e41581f75..5c9b4c783b 100644 --- a/source3/lib/util_unistr.c +++ b/source3/lib/util_unistr.c @@ -169,6 +169,7 @@ 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(dest_len==-1) dest_len=MAXUNI-3; return pull_ucs2(NULL, dest, src, dest_len, src_len, flags|STR_UNICODE|STR_NOALIGN); } |