pkgsrc/time/pcal/patches/patch-ag

24 lines
630 B
Text

$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';