From d45d113659e31977630c410db1253de47bb34bd4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 14 Oct 2005 21:46:32 +0000 Subject: r11073: safety checks on pointers to prevent crashing when converting REG_MULTI_SZ (This used to be commit db8d85aa1ec5c486f061f97627b6b18a0e17cd34) --- source3/registry/reg_util.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/registry/reg_util.c') diff --git a/source3/registry/reg_util.c b/source3/registry/reg_util.c index 4338699c00..511e9b4335 100644 --- a/source3/registry/reg_util.c +++ b/source3/registry/reg_util.c @@ -137,7 +137,10 @@ int regval_convert_multi_sz( uint16 *multi_string, size_t multi_len, char ***val uint16 *wp; *values = NULL; - + + if ( !multi_string || !*values ) + return 0; + /* just count the NULLs */ for ( i=0; (i