Skip to content

token validation in check_header_response #1

@donaldrs

Description

@donaldrs

There is a slight bug in the token validation in check_header_response in context.c. The token as read from the message is now calculated as
token2 = msg[HEADER_REQ_ID_B0] | (msg[HEADER_REQ_ID_B1] << 8U) |
(msg[HEADER_REQ_ID_B1] << 16U) | (msg[HEADER_REQ_ID_B1] << 24U);

This should be
token2 = msg[HEADER_REQ_ID_B0] | (msg[HEADER_REQ_ID_B1] << 8U) |
(msg[HEADER_REQ_ID_B2] << 16U) | (msg[HEADER_REQ_ID_B3] << 24U);

This causes all request from token 256 on to fail. When changing the last two "B1"s to 'B2" and "B3" everything works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions