Fixed bug #118
authorSam Lantinga <slouken@libsdl.org>
Sat, 14 Jul 2007 23:46:47 +0000
changeset 3489f2d2fbe2e1e
parent 347 33d5f49ed91e
child 349 c87c1d5dfd08
Fixed bug #118

Fixed memory corruption in timidity resampling code.
CHANGES
timidity/resample.c
     1.1 --- a/CHANGES	Mon Jul 09 01:09:51 2007 +0000
     1.2 +++ b/CHANGES	Sat Jul 14 23:46:47 2007 +0000
     1.3 @@ -1,3 +1,7 @@
     1.4 +1.2.8:
     1.5 +Sam Lantinga - Sat Jul 14 07:02:09 PDT 2007
     1.6 + * Fixed memory corruption in timidity resampling code
     1.7 +
     1.8  1.2.7:
     1.9  Sam Lantinga - Fri May 12 00:04:32 PDT 2006
    1.10   * Added support for dynamically loading SMPEG library
     2.1 --- a/timidity/resample.c	Mon Jul 09 01:09:51 2007 +0000
     2.2 +++ b/timidity/resample.c	Sat Jul 14 23:46:47 2007 +0000
     2.3 @@ -720,7 +720,7 @@
     2.4    while (--count)
     2.5      {
     2.6        vptr = src + (ofs >> FRACTION_BITS);
     2.7 -      v1 = *(vptr - 1);
     2.8 +      v1 = (vptr == src) ? *vptr : *(vptr - 1);
     2.9        v2 = *vptr;
    2.10        v3 = *(vptr + 1);
    2.11        v4 = *(vptr + 2);