diff options
author | Frederic Culot <calcurse@culot.org> | 2006-12-15 15:25:09 +0000 |
---|---|---|
committer | Frederic Culot <calcurse@culot.org> | 2006-12-15 15:25:09 +0000 |
commit | 9d7650295c8e2da73768f7a5580fa041a833f416 (patch) | |
tree | 2d3da9daa6de7b9b42025794bb05ae8d6dbdb707 /src/event.c | |
parent | 2e1995320d959c22509f1d5201bb3363f1e966b8 (diff) | |
download | calcurse-9d7650295c8e2da73768f7a5580fa041a833f416.zip |
strcpy replaced by strncpy
Diffstat (limited to 'src/event.c')
-rwxr-xr-x | src/event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/event.c b/src/event.c index 4cf3953..aeeee8d 100755 --- a/src/event.c +++ b/src/event.c @@ -1,4 +1,4 @@ -/* $calcurse: event.c,v 1.1 2006/07/31 21:00:03 culot Exp $ */ +/* $calcurse: event.c,v 1.2 2006/12/15 15:25:28 culot Exp $ */ /* * Calcurse - text-based organizer @@ -42,7 +42,7 @@ struct event_s *event_new(char *mesg, long day, int id) struct event_s *o, **i; o = (struct event_s *) malloc(sizeof(struct event_s)); o->mesg = (char *) malloc(strlen(mesg) + 1); - strcpy(o->mesg, mesg); + strncpy(o->mesg, mesg, strlen(mesg) + 1); o->day = day; o->id = id; i = &eventlist; |