Mercurial > audlegacy-plugins
diff src/modplug/sndfile.cxx @ 143:e8f34254bc18 trunk
[svn] - overflow fixes for modplug (via Stanislav Brabec @ novell/suse).
| author | nenolod |
|---|---|
| date | Sun, 29 Oct 2006 12:29:05 -0800 |
| parents | 6b5a52635b3b |
| children | 4095ceb0440b |
line wrap: on
line diff
--- a/src/modplug/sndfile.cxx Sun Oct 29 01:08:30 2006 -0700 +++ b/src/modplug/sndfile.cxx Sun Oct 29 12:29:05 2006 -0800 @@ -1079,10 +1079,11 @@ UINT CSoundFile::ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR lpMemFile, DWORD dwMemLength) //------------------------------------------------------------------------------------------------ { - UINT len = 0, mem = pIns->nLength+6; + UINT len = 0, mem; if ((!pIns) || (pIns->nLength < 4) || (!lpMemFile)) return 0; if (pIns->nLength > MAX_SAMPLE_LENGTH) pIns->nLength = MAX_SAMPLE_LENGTH; + mem = pIns->nLength+6; pIns->uFlags &= ~(CHN_16BIT|CHN_STEREO); if (nFlags & RSF_16BIT) {
