aboutsummaryrefslogtreecommitdiff
path: root/recipes/termcap/termcap-2.0.8/008_all_termcap-buffer.patch
blob: f177149990681dec0c0525015f06cc88e5ebdd89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- termcap-2.0.8.orig/termcap.c
+++ termcap-2.0.8/termcap.c
@@ -471,6 +471,10 @@
   for(bp = s; *bp; bp++) {
	*sp++ = *bp;
	count++;
+	if (count >= maxlen-1) {
+		write(2, "tgetent: warning: termcap entry too long\n", 41);
+		break;
+	}
   }
   *sp++ = ':';
   count++;