python2.3-osd: python-osd breaks Python builtins functions

Bug #6971 reported by Debian Bug Importer
4
Affects Status Importance Assigned to Milestone
python-osd (Debian)
Fix Released
Unknown
python-osd (Ubuntu)
Fix Released
Medium
Matt Zimmerman

Bug Description

Automatically imported from Debian bug report #258142 http://bugs.debian.org/258142

Revision history for this message
In , Matt Zimmerman (mdz) wrote :

What a curious bug. I can't reproduce it here:

Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
[GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyosd
>>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
>>> y=float('55.4')
>>>

ii python 2.3.4-1 An interactive high-level object-oriented la
ii python-osd 0.2.6-1 Python bindings for X On-Screen Display libr

Linux mizar 2.6.6-deb1-skas3 #1 Fri May 28 10:20:53 PDT 2004 i686 GNU/Linux

--
 - mdz

Revision history for this message
In , Jerome Alet (jalet) wrote :

On Wed, Jul 07, 2004 at 03:05:29PM -0700, Matt Zimmerman wrote:
> What a curious bug. I can't reproduce it here:
>
> Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
> [GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyosd
> >>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
> >>> y=float('55.4')
> >>>

Yes, really strange bug.

I confirm I can reproduce this both in this little script and in a
more complex application of mine which mixes float() calls and pyosd
calls, and the solution is the same in all cases : do the float()
calls BEFORE the pyosd calls

This on both my home computer and my laptop at work

No idea of what the problem could be, time to use a debugger maybe...

bye

Jerome Alet

Revision history for this message
In , Jerome Alet (jalet) wrote :

On Wed, Jul 07, 2004 at 03:05:29PM -0700, Matt Zimmerman wrote:
> What a curious bug. I can't reproduce it here:
>
> Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
> [GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyosd
> >>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
> >>> y=float('55.4')
> >>>

Found !!!

the bug is there :

once pyosd is called, you have to do :

        float("55,4")

instead of :

        float("55.4")

for the float() call to work

this has to do with the locale (I'm french, and numbers are separated
with commas here)

not sure where the problem really is though, but this fixes the problem
and may explain why you didn't encounter it

Please tell me how I could be more helpful to solve this problem
definitely

Jerome Alet

Revision history for this message
In , Matt Zimmerman (mdz) wrote :

reassign 258142 xosd
thanks

On Thu, Jul 08, 2004 at 12:16:44AM +0200, Jerome Alet wrote:

> Found !!!
>
> the bug is there :
>
> once pyosd is called, you have to do :
>
> float("55,4")
>
> instead of :
>
> float("55.4")
>
> for the float() call to work
>
> this has to do with the locale (I'm french, and numbers are separated
> with commas here)

Well spotted. xosd_create contains a call to:

  setlocale (LC_ALL, "");

which will set the program's locale based on the environment. I do not
think a library function should do this. Reassigning to xosd.

--
 - mdz

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #258142 http://bugs.debian.org/258142

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <email address hidden>
Date: Wed, 07 Jul 2004 23:15:24 +0200
From: Jerome Alet <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: python2.3-osd: python-osd breaks Python builtins functions

Package: python2.3-osd
Version: 0.2.6-1
Severity: critical
Justification: breaks unrelated software

python-osd, when used breaks the float() builtin function

I suppose there's a buffer overflow somewhere which overwrites
some Python buffer or code or something like that

look :

jerome@nordine:~$ python
Python 2.3.4 (#2, Jun 19 2004, 18:15:30)
[GCC 3.3.4 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyosd
>>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
>>> y=float('55.4')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: invalid literal for float(): 55.4

and without python-osd :

jerome@nordine:~$ python
Python 2.3.4 (#2, Jun 19 2004, 18:15:30)
[GCC 3.3.4 (Debian)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> y=float('55.4')
>>>

no error there.

Interestingly, float('55') seems to work ok even with python-osd

Also interesting is the fact that the float() function works fine BEFORE
the python-osd module's code is used, and breaks after that

Tested on two different machines, with both sarge and unstable
same problem.

hth

Jerome Alet

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.26-1-686
Locale: LANG=C, LC_CTYPE=C (ignored: LC_ALL set to fr_FR@euro)

Versions of packages python2.3-osd depends on:
ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an
ii libxosd2 2.2.7-1 X On-Screen Display library - runt
ii python2.3 2.3.4-2 An interactive high-level object-o

-- no debconf information

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 7 Jul 2004 15:05:29 -0700
From: Matt Zimmerman <email address hidden>
To: <email address hidden>, Jerome Alet <email address hidden>
Subject: Re: python2.3-osd: python-osd breaks Python builtins functions

What a curious bug. I can't reproduce it here:

Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
[GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyosd
>>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
>>> y=float('55.4')
>>>

ii python 2.3.4-1 An interactive high-level object-oriented la
ii python-osd 0.2.6-1 Python bindings for X On-Screen Display libr

Linux mizar 2.6.6-deb1-skas3 #1 Fri May 28 10:20:53 PDT 2004 i686 GNU/Linux

--
 - mdz

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Jul 2004 00:10:14 +0200
From: Jerome Alet <email address hidden>
To: Matt Zimmerman <email address hidden>
Cc: <email address hidden>, Jerome Alet <email address hidden>
Subject: Re: python2.3-osd: python-osd breaks Python builtins functions

On Wed, Jul 07, 2004 at 03:05:29PM -0700, Matt Zimmerman wrote:
> What a curious bug. I can't reproduce it here:
>
> Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
> [GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyosd
> >>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
> >>> y=float('55.4')
> >>>

Yes, really strange bug.

I confirm I can reproduce this both in this little script and in a
more complex application of mine which mixes float() calls and pyosd
calls, and the solution is the same in all cases : do the float()
calls BEFORE the pyosd calls

This on both my home computer and my laptop at work

No idea of what the problem could be, time to use a debugger maybe...

bye

Jerome Alet

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 8 Jul 2004 00:16:44 +0200
From: Jerome Alet <email address hidden>
To: Matt Zimmerman <email address hidden>
Cc: <email address hidden>, Jerome Alet <email address hidden>
Subject: Re: python2.3-osd: python-osd breaks Python builtins functions

On Wed, Jul 07, 2004 at 03:05:29PM -0700, Matt Zimmerman wrote:
> What a curious bug. I can't reproduce it here:
>
> Python 2.3.4 (#2, Jul 5 2004, 09:15:05)
> [GCC 3.3.4 (Debian 1:3.3.4-2)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pyosd
> >>> x=pyosd.osd(colour="#FF0000", timeout=5, shadow=2)
> >>> y=float('55.4')
> >>>

Found !!!

the bug is there :

once pyosd is called, you have to do :

        float("55,4")

instead of :

        float("55.4")

for the float() call to work

this has to do with the locale (I'm french, and numbers are separated
with commas here)

not sure where the problem really is though, but this fixes the problem
and may explain why you didn't encounter it

Please tell me how I could be more helpful to solve this problem
definitely

Jerome Alet

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 7 Jul 2004 15:25:09 -0700
From: Matt Zimmerman <email address hidden>
To: Jerome Alet <email address hidden>
Cc: <email address hidden>
Subject: Re: python2.3-osd: python-osd breaks Python builtins functions

reassign 258142 xosd
thanks

On Thu, Jul 08, 2004 at 12:16:44AM +0200, Jerome Alet wrote:

> Found !!!
>
> the bug is there :
>
> once pyosd is called, you have to do :
>
> float("55,4")
>
> instead of :
>
> float("55.4")
>
> for the float() call to work
>
> this has to do with the locale (I'm french, and numbers are separated
> with commas here)

Well spotted. xosd_create contains a call to:

  setlocale (LC_ALL, "");

which will set the program's locale based on the environment. I do not
think a library function should do this. Reassigning to xosd.

--
 - mdz

Revision history for this message
In , Philipp Hahn (pmhahn) wrote : Bug#258142: fixed in xosd 2.2.8-1

Source: xosd
Source-Version: 2.2.8-1

We believe that the bug you reported is fixed in the latest version of
xosd, which is due to be installed in the Debian FTP archive:

libxosd-dev_2.2.8-1_i386.deb
  to pool/main/x/xosd/libxosd-dev_2.2.8-1_i386.deb
libxosd2_2.2.8-1_i386.deb
  to pool/main/x/xosd/libxosd2_2.2.8-1_i386.deb
xmms-osd-plugin_2.2.8-1_i386.deb
  to pool/main/x/xosd/xmms-osd-plugin_2.2.8-1_i386.deb
xosd-bin_2.2.8-1_i386.deb
  to pool/main/x/xosd/xosd-bin_2.2.8-1_i386.deb
xosd_2.2.8-1.diff.gz
  to pool/main/x/xosd/xosd_2.2.8-1.diff.gz
xosd_2.2.8-1.dsc
  to pool/main/x/xosd/xosd_2.2.8-1.dsc
xosd_2.2.8.orig.tar.gz
  to pool/main/x/xosd/xosd_2.2.8.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philipp Matthias Hahn <email address hidden> (supplier of updated xosd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 8 Jul 2004 09:51:50 +0200
Source: xosd
Binary: libxosd-dev xmms-osd-plugin xosd-bin libxosd2
Architecture: source i386
Version: 2.2.8-1
Distribution: unstable
Urgency: low
Maintainer: Philipp Matthias Hahn <email address hidden>
Changed-By: Philipp Matthias Hahn <email address hidden>
Description:
 libxosd-dev - X On-Screen Display library - development
 libxosd2 - X On-Screen Display library - runtime
 xmms-osd-plugin - XMMS plugin using xosd
 xosd-bin - X On-Screen Display library - binary files
Closes: 253332 258142
Changes:
 xosd (2.2.8-1) unstable; urgency=low
 .
   * New upstream version:
     - new version of osd_cat that can do percentage and slider bars
     - speed optimisation
   * Bump standards to 3.6.1.1
     - No changes.
   * Replace dependency on xlibs-{dev,pic} with new dependencies.
     (closes: #253332)
   * Remove setlocale() from src/libxosd/xosd.c (closes: #258142)
Files:
 0a7e2da491eba24cd0887b62126abaa0 735 x11 optional xosd_2.2.8-1.dsc
 05c8c30c6b2305ba103cd9534f004428 391466 x11 optional xosd_2.2.8.orig.tar.gz
 531e4335e67e24086ed80b27d8e89884 7212 x11 optional xosd_2.2.8-1.diff.gz
 6985f225f0e9d32673bb9824448a9f3a 25224 libs optional libxosd2_2.2.8-1_i386.deb
 08dfda1158e368d89c8e74218806723d 37766 libdevel optional libxosd-dev_2.2.8-1_i386.deb
 9c763b480bab3f0104d385363a4039ad 19284 x11 optional xosd-bin_2.2.8-1_i386.deb
 08eee1ade59cb7faf9c95d547c77f1bb 33660 sound optional xmms-osd-plugin_2.2.8-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7WFAYPlgoZpUDjkRArcaAKCldLKL4retL+MkhaiJ3Y2fgmkbUgCfYbEH
y2cQRsEu6deDLuMx7vbIcQA=
=1/d2
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :
Download full text (3.1 KiB)

Message-Id: <email address hidden>
Date: Thu, 08 Jul 2004 11:17:15 -0400
From: Philipp Matthias Hahn <email address hidden>
To: <email address hidden>
Subject: Bug#258142: fixed in xosd 2.2.8-1

Source: xosd
Source-Version: 2.2.8-1

We believe that the bug you reported is fixed in the latest version of
xosd, which is due to be installed in the Debian FTP archive:

libxosd-dev_2.2.8-1_i386.deb
  to pool/main/x/xosd/libxosd-dev_2.2.8-1_i386.deb
libxosd2_2.2.8-1_i386.deb
  to pool/main/x/xosd/libxosd2_2.2.8-1_i386.deb
xmms-osd-plugin_2.2.8-1_i386.deb
  to pool/main/x/xosd/xmms-osd-plugin_2.2.8-1_i386.deb
xosd-bin_2.2.8-1_i386.deb
  to pool/main/x/xosd/xosd-bin_2.2.8-1_i386.deb
xosd_2.2.8-1.diff.gz
  to pool/main/x/xosd/xosd_2.2.8-1.diff.gz
xosd_2.2.8-1.dsc
  to pool/main/x/xosd/xosd_2.2.8-1.dsc
xosd_2.2.8.orig.tar.gz
  to pool/main/x/xosd/xosd_2.2.8.orig.tar.gz

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to <email address hidden>,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philipp Matthias Hahn <email address hidden> (supplier of updated xosd package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing <email address hidden>)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Thu, 8 Jul 2004 09:51:50 +0200
Source: xosd
Binary: libxosd-dev xmms-osd-plugin xosd-bin libxosd2
Architecture: source i386
Version: 2.2.8-1
Distribution: unstable
Urgency: low
Maintainer: Philipp Matthias Hahn <email address hidden>
Changed-By: Philipp Matthias Hahn <email address hidden>
Description:
 libxosd-dev - X On-Screen Display library - development
 libxosd2 - X On-Screen Display library - runtime
 xmms-osd-plugin - XMMS plugin using xosd
 xosd-bin - X On-Screen Display library - binary files
Closes: 253332 258142
Changes:
 xosd (2.2.8-1) unstable; urgency=low
 .
   * New upstream version:
     - new version of osd_cat that can do percentage and slider bars
     - speed optimisation
   * Bump standards to 3.6.1.1
     - No changes.
   * Replace dependency on xlibs-{dev,pic} with new dependencies.
     (closes: #253332)
   * Remove setlocale() from src/libxosd/xosd.c (closes: #258142)
Files:
 0a7e2da491eba24cd0887b62126abaa0 735 x11 optional xosd_2.2.8-1.dsc
 05c8c30c6b2305ba103cd9534f004428 391466 x11 optional xosd_2.2.8.orig.tar.gz
 531e4335e67e24086ed80b27d8e89884 7212 x11 optional xosd_2.2.8-1.diff.gz
 6985f225f0e9d32673bb9824448a9f3a 25224 libs optional libxosd2_2.2.8-1_i386.deb
 08dfda1158e368d89c8e74218806723d 37766 libdevel optional libxosd-dev_2.2.8-1_i386.deb
 9c763b480bab3f0104d385363a4039ad 19284 x11 optional xosd-bin_2.2.8-1_i386.deb
 08eee1ade59cb7faf9c95d547c77f1bb 33660 sound optional xmms-osd-plugin_2.2.8-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA7WFAYPlgoZpUDjkRArcaAKCldLKL4retL+MkhaiJ3Y2fgmkbUgCfYbEH
y2cQRsEu6deDLuMx7vbIcQA=
=1/d2
-----END PGP SIGNATURE---...

Read more...

Revision history for this message
Matt Zimmerman (mdz) wrote :

Fixed via sync of 2.2.8-1 (changes reviewed by me)

Changed in python-osd:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.