Ensure that the in/out sizes passed in the nd_cmd_package are sane for
the fixed output size commands (i.e. inject error and clear injected
error).
Reported-by: Dariusz Dokupil <dariusz.dokupil@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
{
int rc;
- if (buf_len < sizeof(*err_inj)) {
+ if (buf_len != sizeof(*err_inj)) {
rc = -EINVAL;
goto err;
}
{
int rc;
- if (buf_len < sizeof(*err_clr)) {
+ if (buf_len != sizeof(*err_clr)) {
rc = -EINVAL;
goto err;
}