From e4c733f4ceb17c5a782bf36daf46b8c29a7442dc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 11 Mar 2006 23:11:24 +0000 Subject: r14219: Fix coverity #135. Don't deref a ptr if it can be NULL. Jeremy. (This used to be commit 666d427c6e10aa4194348e8acc3997682f090b48) --- source3/rpc_parse/parse_misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/rpc_parse/parse_misc.c') 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); -- cgit