Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / time / pcal / patches / patch-af
blob9ab99927b79f4adf36f6d725d0e47dafde9f8530
1 $NetBSD: patch-af,v 1.1 2005/03/20 21:34:17 salo Exp $
3 --- pcalutil.c.orig     2000-02-09 16:06:23.000000000 +0000
4 +++ pcalutil.c
5 @@ -1063,11 +1063,11 @@ cvt_escape(obuf, ibuf)
6   */
7  int
8  #ifdef PROTOS
9 -getline(FILE *fp,
10 +get_line(FILE *fp,
11         char *buf,
12         int *pline)
13  #else
14 -getline(fp, buf, pline)
15 +get_line(fp, buf, pline)
16         FILE *fp;
17         char *buf;
18         int *pline;
19 @@ -1111,6 +1111,8 @@ getline(fp, buf, pline)
20                                 else
21                                         ungetc(c2, fp);
22                         }
23 +                       /* Don't overflow the buffer */
24 +                       if ( (cp - tmpbuf) < (LINSIZ -1))
25                         *cp++ = c;
26                 }