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

 
 

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

Submitted by:  Egmont Koblinger <egmont>
Submitted on:  Fri 05 Mar 2004 09:55:24 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Michael Vogt <mvogt>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
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

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 7 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 01 Jun 2004 10:56:22 AM UTCmvogtStatusNone=>Fixed
  Assigned toNone=>mvogt
  Open/ClosedOpen=>Closed
Fri 05 Mar 2004 10:00:02 PM UTCegmontAttached File-=>Added utf8-free.patch, #1095
Fri 05 Mar 2004 09:57:17 PM UTCegmontAttached File-=>Added synaptic2.png, #1094
Fri 05 Mar 2004 09:56:39 PM UTCegmontAttached File-=>Added synaptic1.png, #1093
Fri 05 Mar 2004 09:55:24 PM UTCegmontAttached File-=>Added utf8-free.patch, #1092

Back to the top


Powered by Savane 3.1-cleanup1