mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 21:21:04 +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
9f99d1b2cc
commit
74e69567ef
1 changed files with 2 additions and 1 deletions
|
@ -933,7 +933,8 @@ void pre_resample(Sample * sp)
|
||||||
return;
|
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[newlen >> FRACTION_BITS] = 0;
|
||||||
|
|
||||||
*dest++ = src[0];
|
*dest++ = src[0];
|
||||||
|
|
Loading…
Reference in a new issue