Skip to content

Commit 3e48c1b

Browse files
lovellfarindk
authored andcommitted
seq_boxes: check for sbgp read errors within loop
Ensures a fail-fast approach as used with other boxes
1 parent 9c28f00 commit 3e48c1b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libheif/sequences/seq_boxes.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,9 @@ Error Box_sbgp::parse(BitstreamRange& range, const heif_security_limits* limits)
13021302
e.sample_count = range.read32();
13031303
e.group_description_index = range.read32();
13041304
m_entries.push_back(e);
1305+
if (range.error()) {
1306+
return range.get_error();
1307+
}
13051308
}
13061309

13071310
return range.get_error();

0 commit comments

Comments
 (0)