summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 12:22:13 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-22 12:26:41 +0100
commit885a167929c7f5409a6239705ef6142ecc014ff3 (patch)
treeed12e94dbd51838d97573b3ba3a8950ccb4edfc8 /source4
parent6f7f16dc80000ccea582036dc58ce81ea9f078b0 (diff)
downloadsamba-885a167929c7f5409a6239705ef6142ecc014ff3.tar.gz
samba-885a167929c7f5409a6239705ef6142ecc014ff3.tar.bz2
samba-885a167929c7f5409a6239705ef6142ecc014ff3.zip
s4:registry - "util.c" - "reg_string_to_val" - consider always the return values
In some cases we didn't consider them.
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/registry/util.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c
index 3c1289956d..b389ea4698 100644
--- a/source4/lib/registry/util.c
+++ b/source4/lib/registry/util.c
@@ -146,24 +146,26 @@ _PUBLIC_ bool reg_string_to_val(TALLOC_CTX *mem_ctx,
break;
case REG_SZ:
case REG_EXPAND_SZ:
- convert_string_talloc_convenience(mem_ctx,
- iconv_convenience,
- CH_UNIX, CH_UTF16,
- data_str,
- strlen(data_str)+1,
- (void **)&data->data,
- &data->length, false);
+ return convert_string_talloc_convenience(mem_ctx,
+ iconv_convenience,
+ CH_UNIX, CH_UTF16,
+ data_str,
+ strlen(data_str)+1,
+ (void **)&data->data,
+ &data->length, false);
break;
case REG_DWORD:
case REG_DWORD_BIG_ENDIAN: {
uint32_t tmp = strtol(data_str, NULL, 0);
*data = data_blob_talloc(mem_ctx, NULL, sizeof(uint32_t));
+ if (data->data == NULL) return false;
SIVAL(data->data, 0, tmp);
}
break;
case REG_QWORD: {
uint64_t tmp = strtoll(data_str, NULL, 0);
*data = data_blob_talloc(mem_ctx, NULL, sizeof(uint64_t));
+ if (data->data == NULL) return false;
SBVAL(data->data, 0, tmp);
}
break;