mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
ctdb: Fix posible NULL deref in logging_init()
Found by covscan. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
a9211ec286
commit
08e03fa7f5
@ -521,7 +521,14 @@ int logging_init(TALLOC_CTX *mem_ctx, const char *logging,
|
||||
}
|
||||
|
||||
name = strtok(str, ":");
|
||||
if (name == NULL) {
|
||||
return EINVAL;
|
||||
}
|
||||
option = strtok(NULL, ":");
|
||||
/*
|
||||
* option can be NULL here, both setup()
|
||||
* backends handle this.
|
||||
*/
|
||||
|
||||
for (i=0; i<ARRAY_SIZE(log_backend); i++) {
|
||||
if (strcmp(log_backend[i].name, name) == 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user