[Xfce4-commits] [apps/orage] 01/01: 4.11.2.5 Coverity fix 31721 strcpy without length check
noreply at xfce.org
noreply at xfce.org
Thu Mar 5 10:05:41 CET 2015
This is an automated email from the git hooks/post-receive script.
juha pushed a commit to branch master
in repository apps/orage.
commit 47da1f9cd73df38fada5bd7c3b550f363616cdd2
Author: Juha Kautto <juha at xfce.org>
Date: Thu Mar 5 11:04:44 2015 +0200
4.11.2.5 Coverity fix 31721 strcpy without length check
Added check for length to prevent overrun
---
configure.in.in | 2 +-
src/event-list.c | 2 +-
src/mainbox.c | 3 ++-
3 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/configure.in.in b/configure.in.in
index 3240bac..f096a75 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.11.2.4-git])
+m4_define([orage_version], [4.11.2.5-git])
m4_define([gtk_minimum_version], [2.14.0])
m4_define([xfce_minimum_version], [4.8.0])
diff --git a/src/event-list.c b/src/event-list.c
index 5dcb486..09c40fc 100644
--- a/src/event-list.c
+++ b/src/event-list.c
@@ -919,7 +919,7 @@ static void create_new_appointment(el_win *el)
char *title, a_day[9];
title = (char *)gtk_window_get_title(GTK_WINDOW(el->Window));
- strncpy(a_day, orage_i18_date_to_icaldate(title));
+ strncpy(a_day, orage_i18_date_to_icaldate(title), 8);
a_day[8] = '\0';
do_appt_win("NEW", a_day, el);
}
diff --git a/src/mainbox.c b/src/mainbox.c
index 6fbecd3..ee7dce5 100644
--- a/src/mainbox.c
+++ b/src/mainbox.c
@@ -82,7 +82,8 @@ static void mFile_newApp_activate_cb(GtkMenuItem *menuitem, gpointer user_data)
orage_message(-100, P_N);
#endif
/* cal has always a day selected here, so it is safe to read it */
- strcpy(cur_date, orage_cal_to_icaldate(GTK_CALENDAR(cal->mCalendar)));
+ strncpy(cur_date, orage_cal_to_icaldate(GTK_CALENDAR(cal->mCalendar)), 8);
+ cur_date[8]='\0';
create_appt_win("NEW", cur_date);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list