Skip to content

Commit

Permalink
cli/riff.c: do not allow unpacked audio samples in WAV (e.g., 24-bit …
Browse files Browse the repository at this point in the history
…samples in 32-bit container)
  • Loading branch information
dbry committed Mar 29, 2024
1 parent ec6914c commit 428bc7d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cli/riff.c
Expand Up @@ -197,8 +197,7 @@ int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, Wavpack
supported = FALSE;

if (!WaveHeader.NumChannels || WaveHeader.NumChannels > WAVPACK_MAX_CLI_CHANS ||
WaveHeader.BlockAlign / WaveHeader.NumChannels < (config->bits_per_sample + 7) / 8 ||
WaveHeader.BlockAlign / WaveHeader.NumChannels > 4 ||
WaveHeader.BlockAlign / WaveHeader.NumChannels != (config->bits_per_sample + 7) / 8 ||
WaveHeader.BlockAlign % WaveHeader.NumChannels)
supported = FALSE;

Expand Down

0 comments on commit 428bc7d

Please sign in to comment.