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

ST 2109 S-ADM Payload Length 2 bytes short in ST 2110-41 #13

Open
knneth opened this issue Oct 26, 2024 · 0 comments
Open

ST 2109 S-ADM Payload Length 2 bytes short in ST 2110-41 #13

knneth opened this issue Oct 26, 2024 · 0 comments

Comments

@knneth
Copy link

knneth commented Oct 26, 2024

The ST 2109 S-ADM Payload Value has a fixed header of 2 bytes (version, format) before the S-ADM XML metadata, but these 2 bytes don't appear to be included in the ST 2109 S-ADM Payload Length field.

The S-ADM Payload Length field is BER encoded in GetSadmST2127Header():

unsigned int berLengthSize = BERLengthEncode(payloadLength, &buff[6]);

... where payloadLength is assumed to equal the compressed size max_payload_size as set in get_sadm_payload() without the 2-byte header, but I have not verified that.

Potential fix:

unsigned int berLengthSize = BERLengthEncode(2 + payloadLength, &buff[6]); 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant