gnome-panel r11081 - trunk/applets/clock
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11081 - trunk/applets/clock
- Date: Wed, 23 Apr 2008 14:09:45 +0100 (BST)
Author: matthiasc
Date: Wed Apr 23 13:09:45 2008
New Revision: 11081
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11081&view=rev
Log:
2008-04-23 Matthias Clasen <mclasen redhat com>
* system-timezone.c (system_timezone_is_valid): Don't assume
that g_io_channel_read_chars returns a NUL-terminated string -
it doesn't.
Modified:
trunk/applets/clock/ChangeLog
trunk/applets/clock/system-timezone.c
Modified: trunk/applets/clock/system-timezone.c
==============================================================================
--- trunk/applets/clock/system-timezone.c (original)
+++ trunk/applets/clock/system-timezone.c Wed Apr 23 13:09:45 2008
@@ -910,7 +910,7 @@
return FALSE;
}
- if (read != 4 || strcmp (buffer, TZ_MAGIC) != 0) {
+ if (read != strlen (TZ_MAGIC) || strncmp (buffer, TZ_MAGIC, strlen (TZ_MAGIC)) != 0) {
g_set_error (error, SYSTEM_TIMEZONE_ERROR,
SYSTEM_TIMEZONE_ERROR_INVALID_TIMEZONE_FILE,
"%s is not a timezone file",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]