diff options
Diffstat (limited to 'daemons/cmirrord')
-rw-r--r-- | daemons/cmirrord/functions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index de807936..16112105 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -1817,8 +1817,11 @@ int pull_state(const char *uuid, uint64_t luid, } if (!strncmp(which, "recovering_region", 17)) { - sscanf(buf, "%llu %u", (unsigned long long *)&lc->recovering_region, - &lc->recoverer); + if (sscanf(buf, "%llu %u", (unsigned long long *)&lc->recovering_region, + &lc->recoverer) != 2) { + LOG_ERROR("cannot parse recovering region from: %s", buf); + return -EINVAL; + } LOG_SPRINT(lc, "CKPT INIT - SEQ#=X, UUID=%s, nodeid = X:: " "recovering_region=%llu, recoverer=%u", SHORT_UUID(lc->uuid), |