Skip to content

Commit 79dad2d

Browse files
committed
mctpd: fix mctp_ctrl_validate_response size check
Use strict less-than when validating the expected response size; the check should reject only sizes strictly smaller than the minimum response struct, not equal to it. Signed-off-by: Nidhin MS <nidhin.ms@intel.com>
1 parent 0e768f2 commit 79dad2d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mctpd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ static int mctp_ctrl_validate_response(struct mctp_ctrl_cmd *cmd,
16751675
{
16761676
struct mctp_ctrl_resp *rsp;
16771677

1678-
if (exp_size <= sizeof(*rsp)) {
1678+
if (exp_size < sizeof(*rsp)) {
16791679
warnx("invalid expected response size!");
16801680
return -EINVAL;
16811681
}

0 commit comments

Comments
 (0)