-rw-r--r-- | core/multimedia/opieplayer/modplug/sndfile.cpp | 5 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/tremor/block.c | 2 | ||||
-rw-r--r-- | core/multimedia/opieplayer/vorbis/tremor/info.c | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/core/multimedia/opieplayer/modplug/sndfile.cpp b/core/multimedia/opieplayer/modplug/sndfile.cpp index 1d0d610..799555c 100644 --- a/core/multimedia/opieplayer/modplug/sndfile.cpp +++ b/core/multimedia/opieplayer/modplug/sndfile.cpp | |||
@@ -1738,9 +1738,12 @@ BOOL CSoundFile::SetPatternName(UINT nPat, LPCSTR lpszName) | |||
1738 | //--------------------------------------------------------- | 1738 | //--------------------------------------------------------- |
1739 | { | 1739 | { |
1740 | char szName[MAX_PATTERNNAME] = ""; // changed from CHAR | 1740 | char szName[MAX_PATTERNNAME] = ""; // changed from CHAR |
1741 | if (nPat >= MAX_PATTERNS) return FALSE; | 1741 | if (nPat >= MAX_PATTERNS) return FALSE; |
1742 | if (lpszName) lstrcpyn(szName, lpszName, MAX_PATTERNNAME); | 1742 | if (lpszName) |
1743 | lstrcpyn(szName, lpszName, MAX_PATTERNNAME); | ||
1744 | else | ||
1745 | return FALSE; | ||
1743 | szName[MAX_PATTERNNAME-1] = 0; | 1746 | szName[MAX_PATTERNNAME-1] = 0; |
1744 | if (!m_lpszPatternNames) m_nPatternNames = 0; | 1747 | if (!m_lpszPatternNames) m_nPatternNames = 0; |
1745 | if (nPat >= m_nPatternNames) | 1748 | if (nPat >= m_nPatternNames) |
1746 | { | 1749 | { |
diff --git a/core/multimedia/opieplayer/vorbis/tremor/block.c b/core/multimedia/opieplayer/vorbis/tremor/block.c index 8949253..7b5531b 100644 --- a/core/multimedia/opieplayer/vorbis/tremor/block.c +++ b/core/multimedia/opieplayer/vorbis/tremor/block.c | |||
@@ -225,10 +225,12 @@ void vorbis_dsp_clear(vorbis_dsp_state *v){ | |||
225 | codec_setup_info *ci=(codec_setup_info *)(vi?vi->codec_setup:NULL); | 225 | codec_setup_info *ci=(codec_setup_info *)(vi?vi->codec_setup:NULL); |
226 | private_state *b=(private_state *)v->backend_state; | 226 | private_state *b=(private_state *)v->backend_state; |
227 | 227 | ||
228 | if(v->pcm){ | 228 | if(v->pcm){ |
229 | if (vi) { | ||
229 | for(i=0;i<vi->channels;i++) | 230 | for(i=0;i<vi->channels;i++) |
230 | if(v->pcm[i])_ogg_free(v->pcm[i]); | 231 | if(v->pcm[i])_ogg_free(v->pcm[i]); |
232 | } | ||
231 | _ogg_free(v->pcm); | 233 | _ogg_free(v->pcm); |
232 | if(v->pcmret)_ogg_free(v->pcmret); | 234 | if(v->pcmret)_ogg_free(v->pcmret); |
233 | } | 235 | } |
234 | 236 | ||
diff --git a/core/multimedia/opieplayer/vorbis/tremor/info.c b/core/multimedia/opieplayer/vorbis/tremor/info.c index 941695e..3499ae4 100644 --- a/core/multimedia/opieplayer/vorbis/tremor/info.c +++ b/core/multimedia/opieplayer/vorbis/tremor/info.c | |||
@@ -96,11 +96,11 @@ void vorbis_comment_clear(vorbis_comment *vc){ | |||
96 | if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); | 96 | if(vc->user_comments[i])_ogg_free(vc->user_comments[i]); |
97 | if(vc->user_comments)_ogg_free(vc->user_comments); | 97 | if(vc->user_comments)_ogg_free(vc->user_comments); |
98 | if(vc->comment_lengths)_ogg_free(vc->comment_lengths); | 98 | if(vc->comment_lengths)_ogg_free(vc->comment_lengths); |
99 | if(vc->vendor)_ogg_free(vc->vendor); | 99 | if(vc->vendor)_ogg_free(vc->vendor); |
100 | } | ||
101 | memset(vc,0,sizeof(*vc)); | 100 | memset(vc,0,sizeof(*vc)); |
102 | } | 101 | } |
102 | } | ||
103 | 103 | ||
104 | /* blocksize 0 is guaranteed to be short, 1 is guarantted to be long. | 104 | /* blocksize 0 is guaranteed to be short, 1 is guarantted to be long. |
105 | They may be equal, but short will never ge greater than long */ | 105 | They may be equal, but short will never ge greater than long */ |
106 | int vorbis_info_blocksize(vorbis_info *vi,int zo){ | 106 | int vorbis_info_blocksize(vorbis_info *vi,int zo){ |