bugSynaptic - Bugs: bug #8027, Incorrect accents in popup...

 
 

bug #8027: Incorrect accents in popup windows, string overrun

Submitter:  Egmont Koblinger <egmont>
Submitted:  Fri 05 Mar 2004 09:55:24 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  mvogt
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 01 Jun 2004 10:56:22 AM UTC, comment #1: 

Thanks for this bugreport and your patch. I believe this bug is fixed in the later synaptic version (thanks to your help). I'll close it therefore.

Michael Vogt <mvogt>
Group administrator
Fri 05 Mar 2004 09:55:24 PM UTC, original submission:  

Please see the two screenshots. The first was taken with
official synaptic 0.47 compiled against apt 0.5.21 (no rpm
support, only deb), the second is with the patch I attach.

These popup windows appear when I start synaptic but the
source mentioned in sources.list is not available.

The first screen has two major bugs that are fixed in the
second one. First, accents are displayed incorrectly.
The error message (No such file or directory in Hungarian)
is formatted in iso-8859-2 by glibc. The resulted screen
proves that is undergoes a locale->utf8 conversion twice
instead of only once. The second bug is that the beginning
and the end of the text is overwritten by some random
garbage.

Actually, it happens sometimes that I get a nearly empty
warning window and a pango warning to stderr about non-valid
utf8 text. So sometimes this random stuff is not even utf8.

Based on these facts my conclusion is: most likely somewhere
in the code (I haven't found it) utf8() is called on the
output of a previous utf8() call. This way the second time
it is called it free()s its current input (the result of
the previous call) before reading it.

I have LANG=hu_HU and no other LC_* variables.

Ps. The patch is only a quick workaround that just happens
to work in this particular case. I believe that this whole
design of static variables and non-reentrant functions is
bad, and will introduce other bugs in the future (or maybe
causes more bugs even now).

Egmont Koblinger <egmont>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #1114:  utf8-free.patch added by egmont (971B - application/octet-stream - sorry, there's a typo in the other patch, use this one!)
file #1113:  synaptic2.png added by egmont (22KiB - image/png - 2nd snapshot: synaptic 0.47 with patch: okay)
file #1112:  synaptic1.png added by egmont (24KiB - image/png - 1st screenshot: synaptic 0.47 without patch: buggy)
file #1111:  utf8-free.patch added by egmont (966B - application/octet-stream - quick patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 7 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-06-01 mvogt StatusNone Fixed
    Assigned toNone mvogt
    Open/ClosedOpen Closed
2004-03-05 egmont Attached File- Added utf8-free.patch, #1095
2004-03-05 egmont Attached File- Added synaptic2.png, #1094
2004-03-05 egmont Attached File- Added synaptic1.png, #1093
2004-03-05 egmont Attached File- Added utf8-free.patch, #1092

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code