diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handler.c | 4 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 0407741bb7b..ab3fa94c0fa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3654,11 +3654,11 @@ get_brickinfo_from_brickid (char *brickid, glusterd_brickinfo_t **brickinfo) volid_str = brickid_dup; brick = strchr (brickid_dup, ':'); - *brick = '\0'; - brick++; if (!volid_str || !brick) goto out; + *brick = '\0'; + brick++; uuid_parse (volid_str, volid); ret = glusterd_volinfo_find_by_volume_id (volid, &volinfo); if (ret) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 963aa076222..5758e217df9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -354,6 +354,10 @@ glusterd_validate_quorum_options (xlator_t *this, char *fullkey, char *value, if (!glusterd_is_quorum_option (fullkey)) goto out; key = strchr (fullkey, '.'); + if (key == NULL) { + ret = -1; + goto out; + } key++; opt = xlator_volume_option_get (this, key); ret = xlator_option_validate (this, key, value, opt, op_errstr); |