Comment 7 for bug 701747

Revision history for this message
Mackenan Grassi (mackenan) wrote :

Yep, I'm sure I'm running the latest version. The first thing I did when I noticed the problem was to update to the latest revision and check if the problem still existed. I just booted into my Ubuntu install and have the same problem with the same revision of Guayadeque. My Ubuntu install is the 64-bit version of 10.10, and my Gentoo install is also a 64-bit build. I'm betting you're using the 32-bit build.

I think I tracked down the problem. In guTrackEditor::WriteItemData, you're passing a pointer to the track year which is of type long, while the variable is type int. This wouldn't be a problem in 32-bit environments where int and long are both 32-bits long, but it is a problem in 64-bit environments where int is 32-bits while long is 64-bits. This has the effect of allowing that call to write on a 64-bit long stretch of memory (which happens to include the length variable). You either need to change the type definitions for those variables (in the guTrack class) to long, or you need to change how the value gets assigned in the WriteItemData function.

After looking at the code, I noticed that you use the same method for updating the track number. That should be changed as well. While it doesn't appear to have the same problem if I simply change the track number, if I put in an insanely large number for the track number it will also overwrite the track year. I've attached a file that's a quick little hack to fix the problem. It allows C to do the long to int type-conversion for you. If I build Guayadeque with that little hack in place, everything works fine.