mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- Fixed a buffer overflow with Timidity++ when playing Sigil e5m5 music.
See https://forum.zdoom.org/viewtopic.php?f=2&t=64910 .
This commit is contained in:
parent
9e9bc7fb7f
commit
768dc56ac0
1 changed files with 2 additions and 1 deletions
|
@ -935,7 +935,8 @@ void pre_resample(Sample * sp)
|
|||
return;
|
||||
}
|
||||
|
||||
dest = newdata = (sample_t *)safe_malloc((int32_t)(newlen >> (FRACTION_BITS - 1)) + 2);
|
||||
// [EP] Fix the bad allocation count.
|
||||
dest = newdata = (sample_t *)safe_malloc(((int32_t)(newlen >> (FRACTION_BITS - 1)) + 2)*sizeof(sample_t));
|
||||
dest[newlen >> FRACTION_BITS] = 0;
|
||||
|
||||
*dest++ = src[0];
|
||||
|
|
Loading…
Reference in a new issue