Skip to content
Permalink
Browse files
fix segfault triggered in fuzzy testing (thanks Dennis Felsing for re…
…porting)
  • Loading branch information
dbry committed Dec 1, 2014
1 parent 5013b9f commit 5d4e146c9f40b08c6a2a6c35dd8340f7fb1d837c
Showing 1 changed file with 2 additions and 0 deletions.
@@ -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--;
}

0 comments on commit 5d4e146

Please sign in to comment.