Skip to content

Commit

Permalink
Check that the header size fits in the stream. (AOMediaCodec#2123)
Browse files Browse the repository at this point in the history
BUG=b/335555272
  • Loading branch information
vrabaud authored Apr 18, 2024
1 parent 89f9b3a commit 961e4fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ The changes are relative to the previous release, unless the baseline is specifi
index_size.
* 'infe' boxes with an item_type different from 'mime' and without a
null-terminated item_name are now considered invalid as per ISO/IEC 14496-12.
* Fix missing header size check (b/335555272).

## [1.0.4] - 2024-02-08

Expand Down
1 change: 1 addition & 0 deletions src/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -4105,6 +4105,7 @@ avifBool avifPeekCompatibleFileType(const avifROData * input)
// Either there is no brand requiring anything in the file but a FileTypebox (so not AVIF), or it is invalid.
return AVIF_FALSE;
}
AVIF_CHECK(avifROStreamHasBytesLeft(&s, header.size));

avifFileType ftyp;
memset(&ftyp, 0, sizeof(avifFileType));
Expand Down

0 comments on commit 961e4fe

Please sign in to comment.