<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title></title>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
body {
margin: 5px 5px 5px 5px;
background-color: #ffffff;
}
/* ---------- Text Styles ---------- */
hr { color: #000000}
body, table /* Normal text */
{
font-size: 9pt;
font-family: 'Courier New';
font-style: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
span.rvts1 /* Heading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #0000ff;
}
span.rvts2 /* Subheading */
{
font-size: 10pt;
font-family: 'Arial';
font-weight: bold;
color: #000080;
}
span.rvts3 /* Keywords */
{
font-size: 10pt;
font-family: 'Arial';
font-style: italic;
color: #800000;
}
a.rvts4, span.rvts4 /* Jump 1 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
a.rvts5, span.rvts5 /* Jump 2 */
{
font-size: 10pt;
font-family: 'Arial';
color: #008000;
text-decoration: underline;
}
span.rvts6
{
font-size: 11pt;
font-family: 'tahoma';
font-weight: bold;
color: #ffffff;
}
span.rvts7
{
font-size: 11pt;
font-family: 'tahoma';
}
a.rvts8, span.rvts8
{
color: #0000ff;
text-decoration: underline;
}
/* ---------- Para Styles ---------- */
p,ul,ol /* Paragraph Style */
{
text-align: left;
text-indent: 0px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
}
.rvps1 /* Centered */
{
text-align: center;
}
--></style>
</head>
<body>
<p>Hello Andrew & The Rest of the List,</p>
<p><br></p>
<p>This error seems to be in mpegfile.cpp in function:</p>
<p>long MPEG::File::nextFrameOffset(long position)</p>
<p><br></p>
<p>This line was allowing i to access an index past the end of the buffer</p>
<p>for(uint i = 0; i < buffer.size()); i++) {</p>
<p><br></p>
<p>The fix:</p>
<p>for(uint i = 0; i < (buffer.size() - 1); i++) {</p>
<p><br></p>
<p>As long as that doesn't break anything else that should fix the problem. (Confirmed on the MP3 that was crashing for Andrew)</p>
<p><br></p>
<p>Best regards,</p>
<p> Indy Sams</p>
<p> <a class=rvts8 href="mailto:indy@driftsolutions.com">mailto:indy@driftsolutions.com</a></p>
<p><br></p>
<p> P.S. This is what part of the alphabet would look like if Q & R were eliminated.</p>
<p><br></p>
<p>Tuesday, June 20, 2006, 4:02:16 PM, you wrote:</p>
<p><br></p>
<div><table border=0 cellpadding=1 cellspacing=2 style="border-color: #000000; border-style: solid;">
<tr valign=top>
<td width=12 style="background-color: #0000ff;">
<p><span class=rvts6>></span></p>
</td>
<td width=726 style="background-color: #ffffff;">
<p><span class=rvts7>I'm having an issue with the Win32 port. This appears to happen to any of the ones that have been posted recently. It seems as if the MP3 file I'm trying to read has a bad tag. </span></p>
<p><br></p>
<p><span class=rvts7>The error is: vector substring is out of range </span></p>
<p><br></p>
<p><span class=rvts7>and the call stack is:</span></p>
<p><span class=rvts7> msvcp80d.dll!std::_Debug_message(const wchar_t * message=0x00585e60, const wchar_t * file=0x00585ea8, unsigned int line=756) Line 23 C++</span></p>
<p><span class=rvts7> tag.dll!std::vector<char,std::allocator<char> >::operator[](unsigned int _Pos=1024) Line 756 + 0x17 bytes C++ </span></p>
<p><span class=rvts7> tag.dll!TagLib::ByteVector::operator[](int index=1024) Line 537 C++</span></p>
<p><span class=rvts7> tag.dll!TagLib::MPEG::File::nextFrameOffset(long position=11659) Line 456 + 0x26 bytes C++</span></p>
<p><span class=rvts7> tag.dll!TagLib::MPEG::File::firstFrameOffset () Line 497 C++</span></p>
<p><span class=rvts7> tag.dll!TagLib::MPEG::Properties::read() Line 149 + 0xd bytes C++</span></p>
<p><span class=rvts7> tag.dll!TagLib::MPEG::Properties::Properties(TagLib::MPEG::File * file=0x014e4fa0, TagLib::AudioProperties::ReadStyle style=Average) Line 73 C++ </span></p>
<p><span class=rvts7> tag.dll!TagLib::MPEG::File::read(bool readProperties=true, TagLib::AudioProperties::ReadStyle propertiesStyle=Average) Line 553 + 0x33 bytes C++</span></p>
<p><span class=rvts7> tag.dll!TagLib::MPEG::File::File(const char * file=0x014e4e20, bool readProperties=true, TagLib::AudioProperties::ReadStyle propertiesStyle=Average) Line 231 C++ </span></p>
<p><span class=rvts7> tag.dll!TagLib::FileRef::create(const char * fileName=0x014e4e20, bool readAudioProperties=true, TagLib::AudioProperties::ReadStyle audioPropertiesStyle=Average) Line 169 + 0x34 bytes C++</span></p>
<p><span class=rvts7> tag.dll!TagLib::FileRef::FileRef (const char * fileName=0x014e4e20, bool readAudioProperties=true, TagLib::AudioProperties::ReadStyle audioPropertiesStyle=Average) Line 59 + 0x31 bytes C++</span></p>
<p><br></p>
<p><span class=rvts7>The error also occurrs if whether I use the c or c++ calls: </span></p>
<p><br></p>
<p><span class=rvts7> TagLib::FileRef file(mFileName.c_str());</span></p>
<p><span class=rvts7>or</span></p>
<p><span class=rvts7> file = taglib_file_new(mFileName.c_str());</span></p>
<p><br></p>
<p><span class=rvts7>Is there a way to check if the file is bad before this point so the app doesn't crash and burn?</span></p>
<p><br></p>
<p><span class=rvts7>Thanks, </span></p>
<p><span class=rvts7>Andy</span></p>
</td>
</tr>
</table>
</div>
</body></html>