Skip to content

mctp_ctrl_validate_response bug #137

@yuanzhaoming

Description

@yuanzhaoming

currently code as below:

static int mctp_ctrl_validate_response(uint8_t *buf, size_t rsp_size,
size_t exp_size, const char *peer,
uint8_t iid, uint8_t cmd)
{
struct mctp_ctrl_resp *rsp;

**if (exp_size <= sizeof(*rsp))** {   //????????????????????
	warnx("invalid expected response size!");
	return -EINVAL;
}

}

It should be *if (exp_size < sizeof(rsp)) more reasonable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions