Skip to content

Commit

Permalink
fix segfault triggered in fuzzy testing (thanks Dennis Felsing for re…
Browse files Browse the repository at this point in the history
…porting)
  • Loading branch information
dbry committed Dec 1, 2014
1 parent 5013b9f commit 5d4e146
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/open_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,8 @@ static int read_metadata_buff (WavpackMetadata *wpmd, unsigned char *blockbuff,
}

if (wpmd->id & ID_ODD_SIZE) {
if (!wpmd->byte_length) // odd size and zero length makes no sense
return FALSE;
wpmd->id &= ~ID_ODD_SIZE;
wpmd->byte_length--;
}
Expand Down

0 comments on commit 5d4e146

Please sign in to comment.