Skip to content
Permalink
Browse files Browse the repository at this point in the history
issue #54: fix potential out-of-bounds heap read
  • Loading branch information
dbry committed Nov 30, 2018
1 parent 070ef6f commit bba5389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/open_utils.c
Expand Up @@ -1258,13 +1258,13 @@ int WavpackVerifySingleBlock (unsigned char *buffer, int verify_checksum)
#endif

if (meta_bc == 4) {
if (*dp++ != (csum & 0xff) || *dp++ != ((csum >> 8) & 0xff) || *dp++ != ((csum >> 16) & 0xff) || *dp++ != ((csum >> 24) & 0xff))
if (*dp != (csum & 0xff) || dp[1] != ((csum >> 8) & 0xff) || dp[2] != ((csum >> 16) & 0xff) || dp[3] != ((csum >> 24) & 0xff))
return FALSE;
}
else {
csum ^= csum >> 16;

if (*dp++ != (csum & 0xff) || *dp++ != ((csum >> 8) & 0xff))
if (*dp != (csum & 0xff) || dp[1] != ((csum >> 8) & 0xff))
return FALSE;
}

Expand Down

0 comments on commit bba5389

Please sign in to comment.