diff options
author | Jeremy Allison <jra@samba.org> | 2003-01-29 06:51:35 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2003-01-29 06:51:35 +0000 |
commit | d4b82b17fc2845acaff51259282960e40b457978 (patch) | |
tree | 39c7d11753bfbbd52c51ff62febf279580f143d1 /source3 | |
parent | 438b5c92d4b993efe9bc195851fcb52f49e919fc (diff) | |
download | samba-d4b82b17fc2845acaff51259282960e40b457978.tar.gz samba-d4b82b17fc2845acaff51259282960e40b457978.tar.bz2 samba-d4b82b17fc2845acaff51259282960e40b457978.zip |
Return 0 instead of crashing when a NULL source string is passed
to rpcstr_pull() - merge from HEAD (tpot).
Jeremy.
(This used to be commit e781388c59d694058576529fb43f861c48011091)
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); } |