summaryrefslogtreecommitdiff
path: root/source3/registry
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 15:35:28 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:06:54 -0700
commit526e875cec15761099438e17df3f56bc2bd5b761 (patch)
tree8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/registry
parente1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff)
downloadsamba-526e875cec15761099438e17df3f56bc2bd5b761.tar.gz
Check error returns from strupper_m() (in all reasonable places).
Diffstat (limited to 'source3/registry')
-rw-r--r--source3/registry/reg_backend_db.c4
-rw-r--r--source3/registry/reg_util_internal.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/registry/reg_backend_db.c b/source3/registry/reg_backend_db.c
index 75ad507e2b0..3e561eb3893 100644
--- a/source3/registry/reg_backend_db.c
+++ b/source3/registry/reg_backend_db.c
@@ -561,7 +561,9 @@ static bool upgrade_v2_to_v3_check_subkeylist(struct db_context *db,
};
bool success = false;
char *path = talloc_asprintf(talloc_tos(), "%s\\%s", key, subkey);
- strupper_m(path);
+ if (!strupper_m(path)) {
+ goto done;
+ }
if (!dbwrap_exists(db, string_term_tdb_data(path))) {
NTSTATUS status;
diff --git a/source3/registry/reg_util_internal.c b/source3/registry/reg_util_internal.c
index b15015b988d..e256c75cb2d 100644
--- a/source3/registry/reg_util_internal.c
+++ b/source3/registry/reg_util_internal.c
@@ -113,7 +113,10 @@ char *normalize_reg_path(TALLOC_CTX *ctx, const char *keyname )
p = strrchr(nkeyname, '\\');
}
- strupper_m(nkeyname);
+ if (!strupper_m(nkeyname)) {
+ TALLOC_FREE(nkeyname);
+ return NULL;
+ }
return nkeyname;
}