Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Source/MediaInfo/Audio/File_Dts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,8 @@ void File_Dts::Extensions()
default:
Extensions_Resynch(false);
}
if (Element_Offset>Element_Size)
Element_Offset=Element_Size; //Prevent unsigned underflow in loop condition if handler left offset past asset boundary
Element_End0();
}
Element_Size=Element_Size_Save;
Expand Down Expand Up @@ -1946,6 +1948,13 @@ void File_Dts::XLL()
return;
}
auto Element_Size_Save=Element_Size;
if (Element_Offset_Start-3+LLFrameSize>Element_Size_Save)

@cjee21 cjee21 Jun 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure that Element_Offset_Start - 3+ LLFrameSize can not overflow. Maybe LLFrameSize>Element_Size - Element_Offset_Start - 3 is better?

{
BS_End();
Element_End0();
Skip_XX(Element_Size-Element_Offset, "(Unknown)");
return;
}
Element_Size=Element_Offset_Start-3+LLFrameSize;
Get_S1 (4, NumChSetsInFrame, "NumChSetsInFrame");
NumChSetsInFrame++; Param_Info1(NumChSetsInFrame);
Expand Down