[Xfce4-commits] <orage:master> 4.6.9.2 Fixed bug 10325 orage_tm_date_to_i18_date too long string in strftime
Juha Kautto
noreply at xfce.org
Mon Nov 4 13:58:01 CET 2013
Updating branch refs/heads/master
to f4f185f94a200dc0cb460271baba044c1f237553 (commit)
from d4118b6846a41316bf47a23b24d395245d9d0b34 (commit)
commit f4f185f94a200dc0cb460271baba044c1f237553
Author: Juha Kautto <juha at xfce.org>
Date: Mon Nov 4 14:51:29 2013 +0200
4.6.9.2 Fixed bug 10325 orage_tm_date_to_i18_date too long string in strftime
Too short temporary conversion string buffers were used in orage_tm_date_to_i18_date
and tray icon handling.
configure.in.in | 2 +-
src/functions.c | 8 ++++----
src/tray_icon.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 4bf31ae..6e1c789 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -9,7 +9,7 @@ dnl Written for Xfce by Juha Kautto <juha at xfce.org>
dnl
dnl Version information
-m4_define([orage_version], [4.9.6.1-git])
+m4_define([orage_version], [4.9.6.2-git])
m4_define([gtk_minimum_version], [2.14.0])
m4_define([xfce_minimum_version], [4.8.0])
diff --git a/src/functions.c b/src/functions.c
index e32ea2b..1db8093 100644
--- a/src/functions.c
+++ b/src/functions.c
@@ -644,18 +644,18 @@ struct tm orage_i18_date_to_tm_date(const char *i18_date)
char *orage_tm_time_to_i18_time(struct tm *tm_time)
{
- static char i18_time[40];
+ static char i18_time[128];
- if (strftime(i18_time, 40, "%x %R", tm_time) == 0)
+ if (strftime(i18_time, 128, "%x %R", tm_time) == 0)
g_error("Orage: orage_tm_time_to_i18_time too long string in strftime");
return(i18_time);
}
char *orage_tm_date_to_i18_date(struct tm *tm_date)
{
- static char i18_date[32];
+ static char i18_date[128];
- if (strftime(i18_date, 32, "%x", tm_date) == 0)
+ if (strftime(i18_date, 128, "%x", tm_date) == 0)
g_error("Orage: orage_tm_date_to_i18_date too long string in strftime");
return(i18_date);
}
diff --git a/src/tray_icon.c b/src/tray_icon.c
index 1c932e9..e24815a 100644
--- a/src/tray_icon.c
+++ b/src/tray_icon.c
@@ -144,12 +144,12 @@ static gboolean format_line(PangoLayout *pl, struct tm *t, char *data
, char *font, char *color)
{
gchar ts[200];
- gchar row[20];
+ gchar row[90];
gchar *row_format = "<span foreground=\"%s\" font_desc=\"%s\">%s</span>";
gchar *strftime_failed = "format_line: strftime %s failed";
if (ORAGE_STR_EXISTS(data)) {
- if (strftime(row, 19, data, t) == 0) {
+ if (strftime(row, 89, data, t) == 0) {
g_warning(strftime_failed, data);
return(FALSE);
}
More information about the Xfce4-commits
mailing list