Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

32bit overflow does not work

Open
#125 9 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
networking

Research direction

Start with the cited timestamp calculations and timeout check in dtls.c, then inspect sorted insertion in netq.c and the uint32_t handling in dtls_time.h. Verify behavior around 32-bit timestamp overflow; done means timeout checks and queue ordering handle those timestamps correctly.

Written by the indexing model from the issue text.

Description

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

Dominant language
C
Stars
122
Forks
67
Avg merge
6d 8h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-tinydtls/tinydtls

All issues in eclipse-tinydtls/tinydtls

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.