aboutsummaryrefslogtreecommitdiffstats
path: root/src/todo.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/todo.c
parent2e1995320d959c22509f1d5201bb3363f1e966b8 (diff)
downloadcalcurse-9d7650295c8e2da73768f7a5580fa041a833f416.tar.gz
calcurse-9d7650295c8e2da73768f7a5580fa041a833f416.zip
strcpy replaced by strncpy
Diffstat (limited to 'src/todo.c')
-rwxr-xr-xsrc/todo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/todo.c b/src/todo.c
index 5efa076..d146824 100755
--- a/src/todo.c
+++ b/src/todo.c
@@ -1,4 +1,4 @@
-/* $calcurse: todo.c,v 1.7 2006/12/13 09:32:22 culot Exp $ */
+/* $calcurse: todo.c,v 1.8 2006/12/15 15:25:50 culot Exp $ */
/*
* Calcurse - text-based organizer
@@ -63,7 +63,7 @@ struct todo_s *todo_add(char *mesg, int id)
struct todo_s *o, **i;
o = (struct todo_s *) malloc(sizeof(struct todo_s));
o->mesg = (char *) malloc(strlen(mesg) + 1);
- strcpy(o->mesg, mesg);
+ strncpy(o->mesg, mesg, strlen(mesg) + 1);
o->id = id;
i = &todolist;
for (;;) {