const char **elements = NULL;
int el;
- if (path == NULL) {
+ if (path == NULL || path[0] == '\0') {
return WERR_INVALID_PARAM;
}
el = 0;
}
- while (curbegin != NULL && *curbegin) {
+ do {
if (curend != NULL)
*curend = '\0';
elements = talloc_realloc(mem_ctx, elements, const char *, el+2);
break;
curbegin = curend + 1;
curend = strchr(curbegin, '\\');
- }
+ } while (curbegin != NULL && curbegin[0] != '\0');
talloc_free(orig);
*result = reg_import_hive_key(local_parent->global.context, curkey,
const char **elements = NULL;
int el;
- if (path == NULL) {
+ if (path == NULL || path[0] == '\0') {
return WERR_INVALID_PARAM;
}
el = 0;
}
- while (curbegin != NULL && *curbegin) {
+ do {
if (curend != NULL)
*curend = '\0';
elements = talloc_realloc(mem_ctx, elements, const char *, el+2);
break;
curbegin = curend + 1;
curend = strchr(curbegin, '\\');
- }
+ } while (curbegin != NULL && curbegin[0] != '\0');
talloc_free(orig);
*result = reg_import_hive_key(local_parent->global.context, curkey,