[Xfce4-commits] [apps/orage] 01/01: 4.11.2.17 Coverity fix 31722 copy into fixed size without count

noreply at xfce.org noreply at xfce.org
Wed Mar 11 12:01:38 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 ecf08f0348fd4490615be680fdc68a4bc1ecd88c
Author: Juha Kautto <juha at xfce.org>
Date:   Wed Mar 11 13:00:53 2015 +0200

    4.11.2.17 Coverity fix 31722 copy into fixed size without count
    
    changed from strcpy to strncpy and added limit
---
 configure.in.in |    2 +-
 src/day-view.c  |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.in.in b/configure.in.in
index f26948b..fa89f25 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.17-git])
+m4_define([orage_version], [4.11.2.18-git])
 
 m4_define([gtk_minimum_version], [2.14.0])
 m4_define([xfce_minimum_version], [4.8.0])
diff --git a/src/day-view.c b/src/day-view.c
index 2993ca2..ef8730b 100644
--- a/src/day-view.c
+++ b/src/day-view.c
@@ -171,10 +171,11 @@ static void on_Close_clicked(GtkButton *b, gpointer user_data)
 
 static void create_new_appointment(day_win *dw)
 {
-    char *s_date, a_day[10];
+    char *s_date, a_day[9];
 
     s_date = (char *)gtk_button_get_label(GTK_BUTTON(dw->StartDate_button));
-    strcpy(a_day, orage_i18_date_to_icaldate(s_date));
+    strncpy(a_day, orage_i18_date_to_icaldate(s_date), 8);
+    dw->a_day[8] = '\0';
 
     do_appt_win("NEW", a_day, dw);
 }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list