[Pkg-xfce-devel] Bug#721510: lightdm-gtk-greeter: Greeter panel clock fails with long date formats

Stephen Thomas flabdablet at fastmail.fm
Sun Sep 1 13:08:19 UTC 2013

Package: lightdm-gtk-greeter
Version: 1.6.0-1
Severity: normal

Dear Maintainer,

During system setup I had set clock-format=%A %d %B %Y   %H:%M
in /etc/lightdm/lightdm-gtk-greeter.conf to get a nicely formatted
date included in the greeter panel's clock display.

On the first of September I started seeing number-in-box placeholder
characters appearing on the panel clock where the year and time should
have been.

Function clock_timeout_thread() in lightdm-gtk-greeter.c allocates a
25 byte buffer for strftime() to write the formatted time back to.
This is not long enough to contain the string "Sunday 01 September
2013   23:00", and the code doesn't check the strftime() return value
before passing the buffer to gtk_label_set_markup(). The bogus date
I saw is probably gtk_label_set_markup() trying to display an
unterminated string.

For the time being I'm just using a date format that will always fit
inside 25 characters, but it would be good to make this a little more
robust. Even simply increasing the buffer size to 50 with no other
changes would allow any reasonable date+time format to fit.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lightdm-gtk-greeter depends on:
ii  libc6                   2.17-92
ii  libcairo2               1.12.14-4
ii  libgdk-pixbuf2.0-0      2.28.2-1
ii  libglib2.0-0            2.36.4-1
ii  libgtk-3-0              3.8.2-3
ii  liblightdm-gobject-1-0  1.6.0-3
ii  libx11-6                2:1.6.1-1

Versions of packages lightdm-gtk-greeter recommends:
ii  desktop-base           7.0.3
ii  gnome-icon-theme       3.8.2-2
ii  gnome-themes-standard  3.8.3-1
ii  policykit-1            0.105-3

lightdm-gtk-greeter suggests no packages.

-- Configuration Files:
/etc/lightdm/lightdm-gtk-greeter.conf changed:
clock-format=%A %d %B %Y   %H:%M

-- no debconf information

More information about the Pkg-xfce-devel mailing list