Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ESP32-audioI2S
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ESP32-audioI2S
Commits
6688d301
Commit
6688d301
authored
Sep 05, 2023
by
schreibfaul1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vorbis Decoder crash under low memory condition (Issue #581)
parent
b5b82718
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/vorbis_decoder/vorbis_decoder.cpp
src/vorbis_decoder/vorbis_decoder.cpp
+3
-3
No files found.
src/vorbis_decoder/vorbis_decoder.cpp
View file @
6688d301
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
* adapted for the ESP32 by schreibfaul1
* adapted for the ESP32 by schreibfaul1
*
*
* Created on: 13.02.2023
* Created on: 13.02.2023
* Updated on:
29.08
.2023
* Updated on:
05.09
.2023
*/
*/
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// O G G I M P L.
// O G G I M P L.
...
@@ -724,7 +724,7 @@ int vorbis_book_unpack(codebook_t *s) {
...
@@ -724,7 +724,7 @@ int vorbis_book_unpack(codebook_t *s) {
switch
(
bitReader
(
1
))
{
switch
(
bitReader
(
1
))
{
case
0
:
case
0
:
/* unordered */
/* unordered */
lengthlist
=
(
char
*
)
malloc
(
sizeof
(
*
lengthlist
)
*
s
->
entries
);
lengthlist
=
(
char
*
)
__malloc_heap_psram
(
sizeof
(
*
lengthlist
)
*
s
->
entries
);
/* allocated but unused entries? */
/* allocated but unused entries? */
if
(
bitReader
(
1
))
{
if
(
bitReader
(
1
))
{
...
@@ -760,7 +760,7 @@ int vorbis_book_unpack(codebook_t *s) {
...
@@ -760,7 +760,7 @@ int vorbis_book_unpack(codebook_t *s) {
int32_t
length
=
bitReader
(
5
)
+
1
;
int32_t
length
=
bitReader
(
5
)
+
1
;
s
->
used_entries
=
s
->
entries
;
s
->
used_entries
=
s
->
entries
;
lengthlist
=
(
char
*
)
malloc
(
sizeof
(
*
lengthlist
)
*
s
->
entries
);
lengthlist
=
(
char
*
)
__malloc_heap_psram
(
sizeof
(
*
lengthlist
)
*
s
->
entries
);
for
(
i
=
0
;
i
<
s
->
entries
;)
{
for
(
i
=
0
;
i
<
s
->
entries
;)
{
int32_t
num
=
bitReader
(
_ilog
(
s
->
entries
-
i
));
int32_t
num
=
bitReader
(
_ilog
(
s
->
entries
-
i
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment