[LDTP-Dev] [Bug 574789] New: [PATCH] getwindowlist (and others?) don't handle utf8 well

LDTP (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Tue Mar 10 10:12:02 PDT 2009


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=574789

  LDTP | ldtp | Ver: unspecified
           Summary: [PATCH] getwindowlist (and others?) don't handle utf8
                    well
           Product: LDTP
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ldtp
        AssignedTo: ldtp-maint at gnome.bugs
        ReportedBy: michael.terry at canonical.com
         QAContact: ldtp-dev at lists.freedesktop.org
     GNOME version: Unspecified
   GNOME milestone: Unspecified


I was playing with getwindowlist with utf-8 window titles.  I ran into an issue
when the ldtp server responded with a <FILE> element.  The file specified was
short a few characters, making it invalid XML.

To test this, open, say, http://en.wikipedia.org/wiki/D%C3%A9j%C3%A0_vu in a
browser.  Then run a simple python script that runs ldtp.getwindowlist().

I believe that the server provides a <FILE> element only if the list is big
(looking at the code, over 512 bytes?).  So you may need lots of windows open.

I have a patch, but I haven't tested it yet.  I will try tonight, but wanted to
put it up while I had time.  The problem is that client-handler.c seems to use
g_utf8_strlen when it should use strlen.  I've attached a patch that is more
uniform about its use of strlen.


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=574789.


More information about the LDTP-dev mailing list