summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_misc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-11 23:11:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:17 -0500
commite4c733f4ceb17c5a782bf36daf46b8c29a7442dc (patch)
tree3f533a35e8f2bbb95b8474d25ed3f24d1c9d7592 /source3/rpc_parse/parse_misc.c
parent6c3519d0af8fa14eb8dce4bd7afa0dcff6c9ddfc (diff)
downloadsamba-e4c733f4ceb17c5a782bf36daf46b8c29a7442dc.tar.gz
samba-e4c733f4ceb17c5a782bf36daf46b8c29a7442dc.tar.bz2
samba-e4c733f4ceb17c5a782bf36daf46b8c29a7442dc.zip
r14219: Fix coverity #135. Don't deref a ptr if it can be NULL.
Jeremy. (This used to be commit 666d427c6e10aa4194348e8acc3997682f090b48)
Diffstat (limited to 'source3/rpc_parse/parse_misc.c')
-rw-r--r--source3/rpc_parse/parse_misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_misc.c b/source3/rpc_parse/parse_misc.c
index 838006ab58..8f5ca27365 100644
--- a/source3/rpc_parse/parse_misc.c
+++ b/source3/rpc_parse/parse_misc.c
@@ -908,7 +908,7 @@ void init_unistr4_w( TALLOC_CTX *ctx, UNISTR4 *uni4, const smb_ucs2_t *buf )
void init_unistr2_w(TALLOC_CTX *ctx, UNISTR2 *str, const smb_ucs2_t *buf)
{
- uint32 len = strlen_w(buf);
+ uint32 len = buf ? strlen_w(buf) : 0;
ZERO_STRUCTP(str);