portx64: bug fix: mp3 code accessing out of bounds memory: increased alloc/audio heap size

This commit is contained in:
Raf committed 2024-08-02 17:43:05 +08:00
1 parent 50b912db98
commit 288a007202
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -60,7 +60,11 @@ void mp3Init(ALHeap *heap)
var8009c6d8 = alHeapAlloc(heap, 256 * sizeof(var8009c6d8[0]), 1);
var8009c6dc = alHeapAlloc(heap, 256 * sizeof(var8009c6dc[0]), 1);
#ifdef PLATFORM_64BIT
var8009c640 = alHeapAlloc(heap, 2*10500 * sizeof(struct mp3decfourbytes), 1);
#else
var8009c640 = alHeapAlloc(heap, 10500 * sizeof(struct mp3decfourbytes), 1);
#endif
var8009c644 = alHeapAlloc(heap, 8192 * sizeof(var8009c644[0]), 1);
mp3mainInit();
+1 -1
View File
@@ -1460,7 +1460,7 @@ void sndInit(void)
#endif
#ifdef PLATFORM_64BIT
heaplen = 1024 * 661;
heaplen = 1024 * 745;
#endif
g_Vars.langfilteron = false;