svn commit: samba r14220 - in trunk/source/rpc_parse: .

jra at samba.org jra at samba.org
Sat Mar 11 23:12:09 GMT 2006


Author: jra
Date: 2006-03-11 23:12:08 +0000 (Sat, 11 Mar 2006)
New Revision: 14220

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14220

Log:
Fix coverity #135. Don't deref a ptr if it can be NULL.
Jeremy.

Modified:
   trunk/source/rpc_parse/parse_misc.c


Changeset:
Modified: trunk/source/rpc_parse/parse_misc.c
===================================================================
--- trunk/source/rpc_parse/parse_misc.c	2006-03-11 23:11:24 UTC (rev 14219)
+++ trunk/source/rpc_parse/parse_misc.c	2006-03-11 23:12:08 UTC (rev 14220)
@@ -908,7 +908,7 @@
 
 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);
 



More information about the samba-cvs mailing list