Skip to content

Commit

Permalink
if a.size > atom.size, then throw (#876)
Browse files Browse the repository at this point in the history
* if a.size > atom.size, then throw

* fix lint
  • Loading branch information
iwashiira authored May 9, 2024
1 parent 86b2fe2 commit 6836d7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tsMuxer/movDemuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,10 @@ if (bits_per_sample) {

// this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...)
a.size = size - (m_processedBytes - start_pos);
if (a.size > atom.size)
{
THROW(ERR_MOV_PARSE, "MP4/MOV error: Invalid a.size in mov_read_stsd")
}
if (a.size > 8)
{
if (mov_read_default(a) < 0)
Expand Down

0 comments on commit 6836d7c

Please sign in to comment.