Bugfix: Refuse to accept an unparsable vbrequired

This commit is contained in:
Luke Dashjr
2016-08-11 06:57:42 +00:00
parent f658eabf5e
commit 4be60421c8

View File

@@ -305,7 +305,11 @@ const char *blktmpl_add_jansson(blktemplate_t *tmpl, const json_t *json, time_t
v = json_object_get(json, "vbrequired");
if (v && json_is_number(v)) {
tmpl->vbrequired = json_number_value(v);
double tmpd = json_number_value(v);
tmpl->vbrequired = tmpd;
if (tmpl->vbrequired != tmpd) {
return "Unparsable vbrequired";
}
}
}
else