[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#492917: python-pyao: parsing arguments 64bit issues

Package: python-pyao
Version: 0.82-2
Severity: important

src/aomodule.c uses 's|llll0!sl' and 'i|llll0!sl' as format strings
for parsing the arguments passed to the constructor of ao.AudioDevice,
thus parsing the arguments as 'long int'. 

Whereas the arguments are defined as 'int'.
See /usr/include/ao/ao.h:

  typedef struct ao_sample_format {
      int bits; /* bits per sample */
      int rate; /* samples per second (in a single channel) */
      int channels; /* number of audio channels */
      int byte_format; /* Byte ordering in sample, see constants below */
  } ao_sample_format;

On 64 bit systems a 'long int' is 8 bytes and and 'int' is 4, thus overwritting
other values, when parsing.

Solution: Use format strings 's|iiii0!si' and 'i|iiii0!si' instead.

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-jp2 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-pyao depends on:
ii  libao2                        0.8.8-4    Cross Platform Audio Output Librar
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  python                        2.5.2-1    An interactive high-level object-o
ii  python-central                0.6.8      register and build utility for Pyt

python-pyao recommends no packages.

-- no debconf information

Reply to: