Skip to content

32bit overflow does not work  #125

Description

@kfessel

dtls_time.h seems to be uint32_t aware:
https://github.com/eclipse/tinydtls/blob/68b2521ca668c632d6febf85fe3f9090d26b7b4e/dtls_time.h#L64

but these lines may produce problems with 32bit overflow:

these calculate possibly overflowing time stamps:
https://github.com/eclipse/tinydtls/blob/68b2521ca668c632d6febf85fe3f9090d26b7b4e/dtls.c#L1763
https://github.com/eclipse/tinydtls/blob/68b2521ca668c632d6febf85fe3f9090d26b7b4e/dtls.c#L4534

these do not deal with overflowing timestamps:
calculating if the timeout happend: (timestamp passed by)
https://github.com/eclipse/tinydtls/blob/68b2521ca668c632d6febf85fe3f9090d26b7b4e/dtls.c#L4596

inserting (sorted) into the netq
https://github.com/eclipse/tinydtls/blob/68b2521ca668c632d6febf85fe3f9090d26b7b4e/netq.c#L96

In #123 @boaks and me pointed that out

reference / line number are current develop branch

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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