ittiam-systems / libmpegh

MPEG-H 3D Audio Low Complexity Profile Decoder. Encoder: https://github.com/ittiam-systems/libmpeghe
http://www.ittiam.com/
BSD 3-Clause Clear License
88 stars 18 forks source link

Off-by-one issue in maximum number of description languages check #78

Closed benjamin-weiss closed 4 months ago

benjamin-weiss commented 5 months ago

The check in https://github.com/ittiam-systems/libmpegh/blob/main/decoder/impeghd_mhas_parse.c#L85 should be changed to

if (pstr_description_data->num_descr_languages[blk] > MAX_NUM_DESCR_LANGUAGES)

to actually allow the maximum of 4 description languages.

SakethSathuvalli commented 5 months ago

Hi @benjamin-weiss,

Thanks for bringing this up!

Can You please let know if this issue was discovered by code inspection (or) any specific test condition? - The information can help us improve our regression testing - test suite.

Thanks!

benjamin-weiss commented 5 months ago

We discovered this with a test file, but unfortunately I am not allowed to share it with you.

SakethSathuvalli commented 5 months ago

Thanks! Will it be possible to share the set of command line options / switches used for this testcase ?

SakethSathuvalli commented 5 months ago

@benjamin-weiss - we will have this fix on Main by next week. Thanks again for bringing this to our notice!

benjamin-weiss commented 5 months ago

Sorry for not answering earlier. Unfortunately I have no idea how such a stream can be created.

Great to hear that you will include this in Main soon.

SakethSathuvalli commented 4 months ago

The fix is now available on latest main

benjamin-weiss commented 4 months ago

Thanks!