ref: 1aeb17d34e45ce3d1fa4a640e399d7030d68c207
parent: a4e30b9d7b1f7b647c475f67b018091ba56b7c80
author: qwx <[email protected]>
date: Wed Oct 25 22:10:14 EDT 2023
prevent stack buffer overflow (thanks benwiley4000)
--- a/korg_syro_comp.c
+++ b/korg_syro_comp.c
@@ -394,7 +394,7 @@
/*----- wrtie bit-base ------*/
j = 0;
for (i=0; i<16; i++) {
- if (pBitBase[j]==i) {
+ if (j < 4 && pBitBase[j]==i) {
BitHead[i] = j++;
SyroComp_WriteBit(&wp, (uint32_t)(i-1), 4);
} else {