summaryrefslogtreecommitdiff
path: root/usr.bin/calendar
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-12-18 20:34:45 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-12-18 20:34:45 +0000
commitaf427846461c716ec0fbeb86d399e566a1741953 (patch)
tree23d13f9c3d7ed3d2c0ddab50764b1d86d554ceea /usr.bin/calendar
parent1b33c38cd3170b6cdfd4fabac6582b6177177605 (diff)
t'was not enough space malloced when generating the bodun entries
Diffstat (limited to 'usr.bin/calendar')
-rw-r--r--usr.bin/calendar/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c
index 6c9c91125b9..4dbbcfbf3bb 100644
--- a/usr.bin/calendar/io.c
+++ b/usr.bin/calendar/io.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: io.c,v 1.20 2002/10/16 00:30:58 vincent Exp $ */
+/* $OpenBSD: io.c,v 1.21 2002/12/18 20:34:44 mickey Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -43,7 +43,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
#else
-static char rcsid[] = "$OpenBSD: io.c,v 1.20 2002/10/16 00:30:58 vincent Exp $";
+static char rcsid[] = "$OpenBSD: io.c,v 1.21 2002/12/18 20:34:44 mickey Exp $";
#endif
#endif /* not lint */
@@ -179,7 +179,7 @@ cal(void)
int l1 = strlen(prefix);
int l2 = strlen(p);
if ((cur_evt->ldesc =
- malloc(l1 + l2)) == NULL)
+ malloc(l1 + l2 + 2)) == NULL)
err(1, "malloc");
sprintf(cur_evt->ldesc,
"\t%s %s", prefix, p + 1);