[Vorbis-dev] Re: [xiph-commits] r14479 - trunk/vorbis-tools/ogg123

Ralph Giles giles at xiph.org
Mon Feb 11 15:22:47 PST 2008


On 11-Feb-08, at 12:52 PM, Ivo Emanuel Gonçalves wrote:

> "ogg123 suffers from a 32/64-bit screwup on LP64 platforms.
> cfgfile_options.c expects opt_type_bool and opt_type_int settings
> to be stored in long int variables.  However, ogg123.c:fileopts[]
> points to options.shuffle and options.repeat that are defined as
> int in ogg123.h.  This causes 64-bit writes to 32-bit variables.
> Depending on endianness, strict alignment requirements, and luck,
> this can result in garbage or address errors.  (E.g., on sparc64,
> ogg123 immediately dumps core.)  The easiest way to fix this is to
> bump options.shuffle and .repeat to type long int."

Ok, easiest, but more confusing. As far as I can see, only the bool
options are used, so it would work to convert everything back to
int in cfgfile_options.c. I'd prefer that, and volsung concurred.

If you want to leave it this way, at least document why those switches
are long ints, and fix the dfl (default) pointers to be long to match.

  -r



More information about the Vorbis-dev mailing list