summaryrefslogtreecommitdiffstats
path: root/src/recur.c
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2006-12-15 15:25:09 +0000
committerFrederic Culot <calcurse@culot.org>2006-12-15 15:25:09 +0000
commit9d7650295c8e2da73768f7a5580fa041a833f416 (patch)
tree2d3da9daa6de7b9b42025794bb05ae8d6dbdb707 /src/recur.c
parent2e1995320d959c22509f1d5201bb3363f1e966b8 (diff)
downloadcalcurse-9d7650295c8e2da73768f7a5580fa041a833f416.tar.gz
calcurse-9d7650295c8e2da73768f7a5580fa041a833f416.zip
strcpy replaced by strncpy
Diffstat (limited to 'src/recur.c')
-rwxr-xr-xsrc/recur.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/recur.c b/src/recur.c
index 6f4b860..ac66521 100755
--- a/src/recur.c
+++ b/src/recur.c
@@ -1,4 +1,4 @@
-/* $calcurse: recur.c,v 1.17 2006/12/08 08:42:43 culot Exp $ */
+/* $calcurse: recur.c,v 1.18 2006/12/15 15:26:05 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -64,7 +64,7 @@ recur_apoint_llist_node_t *recur_apoint_new(char *mesg, long start, long dur,
o->rpt = (struct rpt_s *) malloc(sizeof(struct rpt_s));
o->mesg = (char *) malloc(strlen(mesg) + 1);
o->exc = (struct days_s *) malloc(sizeof(struct days_s));
- strcpy(o->mesg, mesg);
+ strncpy(o->mesg, mesg, strlen(mesg) + 1);
o->start = start;
o->dur = dur;
o->rpt->type = type;
@@ -96,7 +96,7 @@ struct recur_event_s *recur_event_new(char *mesg, long day, int id,
o->rpt = (struct rpt_s *) malloc(sizeof(struct rpt_s));
o->mesg = (char *) malloc(strlen(mesg) + 1);
o->exc = (struct days_s *) malloc(sizeof(struct days_s));
- strcpy(o->mesg, mesg);
+ strncpy(o->mesg, mesg, strlen(mesg) + 1);
o->day = day;
o->id = id;
o->rpt->type = type;
@@ -568,7 +568,7 @@ void recur_repeat_item(int sel_year, int sel_month, int sel_day,
status_mesg(mesg_wrong_freq, wrong_type_2);
wgetch(swin);
}
- strcpy(user_input, "");
+ user_input[0] = '\0';
} else {
return;
}