Skip to content

Commit

Permalink
Fix endless loop in foreign metadata handling (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmf01 authored Jul 14, 2024
1 parent d48b689 commit 3468459
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/flac/foreign_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ static FLAC__bool read_from_wave64_(foreign_metadata_t *fm, FILE *f, const char
/* check if pad bytes needed */
if(size & 7)
size = (size+7) & (~((FLAC__uint64)7));
if(size < 24) {
if(error) *error = "invalid Wave64 file: chunk length invalid";
return false;
}
/* fmt GUID 20746D66-ACF3-11D3-8CD1-00C04F8EDB8A */
if(!memcmp(buffer, "\x66\x6D\x74\x20\xF3\xAC\xD3\x11\x8C\xD1\x00\xC0\x4F\x8E\xDB\x8A", 16)) {
if(fm->format_block) {
Expand Down

0 comments on commit 3468459

Please sign in to comment.