Skip to content

Wrong size for variable 'offset'  #26

@pswarfound

Description

@pswarfound

variable 'offset' in function 'ipmiStorageWriteFruData' is declared as uint8_t, but it should be uint16_t.

ipmi_ret_t ipmiStorageWriteFruData(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
ipmi_request_t request,
ipmi_response_t response,
ipmi_data_len_t dataLen,
ipmi_context_t context)
{
...
uint16_t offset = 0; // offset should be declared as uint16_t
...
offset = ((uint16_t)reqptr->offsetms) << 8 | reqptr->offsetls; // otherwise, this operation shall give unexcepted result

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