mirror of
https://github.com/taglib/taglib.git
synced 2025-05-27 21:20:26 -04:00
Fixed a possible out-of-bound access when reading WavPack files
This commit is contained in:
parent
c12b6697f9
commit
e125bcb78b
@ -126,8 +126,9 @@ TagLib::uint WavPack::Properties::sampleFrames() const
|
||||
// private members
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static const unsigned int sample_rates[] = { 6000, 8000, 9600, 11025, 12000,
|
||||
16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200, 96000, 192000 };
|
||||
static const unsigned int sample_rates[] = {
|
||||
6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
|
||||
32000, 44100, 48000, 64000, 88200, 96000, 192000, 0 };
|
||||
|
||||
#define BYTES_STORED 3
|
||||
#define MONO_FLAG 4
|
||||
|
@ -75,7 +75,12 @@ namespace TagLib {
|
||||
|
||||
virtual int length() const;
|
||||
virtual int bitrate() const;
|
||||
|
||||
/*!
|
||||
* Returns the sample rate in Hz. 0 means unknown or custom.
|
||||
*/
|
||||
virtual int sampleRate() const;
|
||||
|
||||
virtual int channels() const;
|
||||
|
||||
/*!
|
||||
|
Loading…
Reference in New Issue
Block a user