Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cord_lc: Process truncated reads #20547

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Apr 5, 2024

Contribution description

When a Resource Directory reports overly long .well-known/core results, those might be truncated due to a limited buffer. This PR ensures that the parts that are received are processed.

It also removes zeroing of the buffer -- clif does not require C style string termination.

Testing procedure

  • Run aiocoap's aiocoap-rd
  • run examples/cord_lc with cord_lc [fe80::f30:40e4:6c93:e17d]:5683 endpoint
  • You should get error -4 indicating that there is no endpoint

Issues/PRs references

@maribu provided the original version of this.

@Teufelchen1, can this still go in?

@chrysn chrysn requested review from maribu and Teufelchen1 April 5, 2024 21:34
@github-actions github-actions bot added Area: network Area: Networking Area: sys Area: System labels Apr 5, 2024
@chrysn chrysn added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 5, 2024
@riot-ci
Copy link

riot-ci commented Apr 5, 2024

Murdock results

✔️ PASSED

9820a65 cord_lc: Process truncated reads

Success Failures Total Runtime
10045 0 10045 10m:07s

Artifacts

@chrysn chrysn force-pushed the lookup-plausibility branch from 2da8dbb to c0258a0 Compare April 5, 2024 21:42
@chrysn
Copy link
Member Author

chrysn commented Apr 5, 2024

I'll read Teufelchen's thumbs-up on the PR as an OK to be merged during soft freeze.

@chrysn chrysn enabled auto-merge April 5, 2024 21:44
@chrysn chrysn disabled auto-merge April 5, 2024 21:44
Co-Authored-By: Marian Buschsieweke <[email protected]>
@chrysn chrysn force-pushed the lookup-plausibility branch from c0258a0 to 9820a65 Compare April 5, 2024 21:45
@chrysn
Copy link
Member Author

chrysn commented Apr 5, 2024

Sent another insta-squashed fix around %d abused as %PRIuSIZE. Ready from my PoV.

@maribu maribu enabled auto-merge April 5, 2024 21:46
@maribu maribu added this pull request to the merge queue Apr 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 5, 2024
@maribu maribu added this pull request to the merge queue Apr 6, 2024
Merged via the queue into RIOT-OS:master with commit 00c30ac Apr 6, 2024
26 checks passed
@chrysn chrysn deleted the lookup-plausibility branch April 6, 2024 08:43
@maribu
Copy link
Member

maribu commented Apr 8, 2024

Backport provided in #20552

@MrKevinWeiss MrKevinWeiss added this to the Release 2024.04 milestone Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants