aboutsummaryrefslogtreecommitdiffstats
path: root/main/ncurses/CVE-2018-10754.patch
blob: 377caa3b401aa372a5ef2af00fb45a7652336d41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: ncurses/tinfo/parse_entry.c
--- ncurses-6.1-20180407+/ncurses/tinfo/parse_entry.c	2017-08-26 19:49:50.000000000 +0000
+++ ncurses-6.1-20180414/ncurses/tinfo/parse_entry.c	2018-04-14 17:41:12.000000000 +0000
@@ -543,9 +543,11 @@
 		 * Otherwise, look for a base entry that will already
 		 * have picked up defaults via translation.
 		 */
-		for (i = 0; i < entryp->nuses; i++)
-		    if (!strchr((char *) entryp->uses[i].name, '+'))
+		for (i = 0; i < entryp->nuses; i++) {
+		    if (entryp->uses[i].name != 0
+			&& !strchr(entryp->uses[i].name, '+'))
 			has_base_entry = TRUE;
+		}
 	    }
 
 	    postprocess_termcap(&entryp->tterm, has_base_entry);