summaryrefslogtreecommitdiff
path: root/time/pcal/patches/patch-ag
blob: daac4d14c19f60ff3158b15c89c7e30ef1f855ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
$NetBSD: patch-ag,v 1.2 2010/04/29 00:17:14 dholland Exp $

--- readfile.c.orig	2000-02-09 16:06:23.000000000 +0000
+++ readfile.c
@@ -235,7 +235,7 @@ read_datefile(fp, filename)
 
 	/* read lines until EOF */
 
-	while (getline(fp, lbuf, &line)) {
+	while (get_line(fp, lbuf, &line)) {
 		char suffix;
 
 		if (DEBUG(DEBUG_PP)) {
@@ -1300,8 +1300,9 @@ get_holiday(cp)
 {
 	KWD_H *p;
 	char tmp[STRSIZ];
+	memset(tmp,'\0',sizeof(tmp));
 
-	strcpy(tmp, cp);		/* make copy without any trailing '*' */
+	strncpy(tmp, cp,sizeof(tmp)-1);		/* make copy without any trailing '*' */
 	if (LASTCHAR(tmp) == '*')
 		LASTCHAR(tmp) = '\0';