Skip to content

Fix DICOM UL AE title field length validation#798

Open
atlex00 wants to merge 3 commits into
Enet4:masterfrom
atlex00:fix/ul-ae-title-wire-length
Open

Fix DICOM UL AE title field length validation#798
atlex00 wants to merge 3 commits into
Enet4:masterfrom
atlex00:fix/ul-ae-title-wire-length

Conversation

@atlex00

@atlex00 atlex00 commented Jun 22, 2026

Copy link
Copy Markdown

The A-ASSOCIATE writer encoded the Called/Calling AE titles and then called resize(16, b' '). Invalid values slipped through: empty and all-space titles were written as the forbidden all-spaces field, and titles longer than 16 bytes were silently truncated.

DICOM PS3.8 §9.3.2 defines both as fixed 16-byte fields where the all-spaces value is not allowed. This adds a shared writer helper that pads valid shorter titles to 16 bytes and returns WriteError::InvalidFixedSizeTextField for empty, all-space, or overlong titles, used for both A-ASSOCIATE-RQ and A-ASSOCIATE-AC.

@atlex00 atlex00 marked this pull request as ready for review June 22, 2026 22:36
@atlex00 atlex00 force-pushed the fix/ul-ae-title-wire-length branch from 14de7c1 to bafda0f Compare June 22, 2026 22:42
@atlex00 atlex00 marked this pull request as draft June 22, 2026 23:05
@atlex00 atlex00 marked this pull request as ready for review June 22, 2026 23:16
@atlex00 atlex00 force-pushed the fix/ul-ae-title-wire-length branch from 43e86f8 to c9b4e8b Compare June 23, 2026 00:45
@atlex00 atlex00 marked this pull request as draft June 23, 2026 00:56
@atlex00 atlex00 marked this pull request as ready for review June 23, 2026 13:28
@atlex00 atlex00 marked this pull request as draft June 29, 2026 11:11
@atlex00

This comment was marked as resolved.

@atlex00 atlex00 force-pushed the fix/ul-ae-title-wire-length branch from 5930f1e to 67e94c7 Compare June 29, 2026 11:18
@atlex00 atlex00 force-pushed the fix/ul-ae-title-wire-length branch from 67e94c7 to 75d9cdb Compare June 29, 2026 11:24
@atlex00 atlex00 marked this pull request as ready for review June 29, 2026 11:35
@Enet4 Enet4 added A-lib Area: library C-ul Crate: dicom-ul labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-lib Area: library C-ul Crate: dicom-ul

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants