Skip to content

[ul] Add robustness in byte availability to PDU reading#610

Merged
Enet4 merged 2 commits intomasterfrom
bug/ul/pdu-available-checks
Dec 7, 2024
Merged

[ul] Add robustness in byte availability to PDU reading#610
Enet4 merged 2 commits intomasterfrom
bug/ul/pdu-available-checks

Conversation

@Enet4
Copy link
Copy Markdown
Owner

@Enet4 Enet4 commented Dec 7, 2024

Fixes an issue encountered while reviving an existing fuzz target in ul/fuzz. Some fuzz test cases were crashing when trying to advance or get bytes in the buffer which were not available.

Summary

  • Update ul/fuzz project to use dicom-ul v0.8
  • Increase robustness of PDU reading
    • add missing checks for enough bytes available
    • check bytes available earlier rather than multiple times in fixed PDU fields
  • remove println! in read_pdu, replace it with a debug-level log line

Enet4 added 2 commits December 7, 2024 12:00
- update pdu_roundtrip target to compile in v0.8
- add helper fuzz.sh
- add more checks for enough bytes available
- check bytes available earlier
- remove println in read_pdu,
  replace it with a debug-level log line
@Enet4 Enet4 added bug This is a bug A-lib Area: library C-ul Crate: dicom-ul A-fuzz Area: fuzz tests labels Dec 7, 2024
@Enet4 Enet4 merged commit 2b76416 into master Dec 7, 2024
@Enet4 Enet4 deleted the bug/ul/pdu-available-checks branch December 7, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-fuzz Area: fuzz tests A-lib Area: library bug This is a bug C-ul Crate: dicom-ul

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant