for (int i = 0; i <= tagsize; ++i)
This goes one beyond the array bounds.
int tagsize = 50;
char buffer[tagsize];
Since tagsize is not const, it would seem that you are using a nonstandard extension. Be aware of that.
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
http://en.wikipedia.org/wiki/ID3
They're not all-text.
They're not always at the beginning,
They're not always present.
They're not always ASCII.
You can't just open the file and read a string, and hope it all works.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953