Skip to content

Commit b142ff4

Browse files
committed
memory corruption
1 parent bc0bb2b commit b142ff4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MP3DecoderHelix.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "libhelix-mp3/mp3dec.h"
55
#include "libhelix-mp3/mp3common.h"
66

7-
#define MP3_MAX_OUTPUT_SIZE 1024 * 2
7+
#define MP3_MAX_OUTPUT_SIZE 1024 * 5
88
#define MP3_MAX_FRAME_SIZE 1600
99

1010
namespace libhelix {
@@ -138,6 +138,9 @@ class MP3DecoderHelix : public CommonHelix {
138138

139139
// return the resulting PWM data
140140
void provideResult(MP3FrameInfo &info){
141+
// increase PWM size if this fails
142+
assert(info.outputSamps<maxPWMSize());
143+
141144
LOG(Debug, "=> provideResult: %d", info.outputSamps);
142145
if (info.outputSamps>0){
143146
// provide result

0 commit comments

Comments
 (0)