1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

registry4: Fix CID 1034911 Dereference before null check

curbegin is always != NULL here (curend + 1) and is dereferenced by
strchr.

Signed-off-by: Volker Lendecke <vl@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Volker Lendecke 2013-08-18 19:34:35 +00:00 committed by Andrew Bartlett
parent cc983c9a6a
commit 2055ce1dbe

View File

@ -124,7 +124,7 @@ static WERROR local_open_key(TALLOC_CTX *mem_ctx,
break;
curbegin = curend + 1;
curend = strchr(curbegin, '\\');
} while (curbegin != NULL && curbegin[0] != '\0');
} while (curbegin[0] != '\0');
talloc_free(orig);
*result = reg_import_hive_key(local_parent->global.context, curkey,