diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-22 12:22:13 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-22 12:26:41 +0100 |
commit | 885a167929c7f5409a6239705ef6142ecc014ff3 (patch) | |
tree | ed12e94dbd51838d97573b3ba3a8950ccb4edfc8 | |
parent | 6f7f16dc80000ccea582036dc58ce81ea9f078b0 (diff) | |
download | samba-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.
-rw-r--r-- | source4/lib/registry/util.c | 16 |
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; |