Blame SOURCES/ncurses-usecap.patch

4f5567
20180414
4f5567
	+ add a null-pointer check in _nc_parse_entry to handle an error when
4f5567
	  a use-name is invalid syntax (report by Chung-Yi Lin).
4f5567
4f5567
diff --git a/ncurses/tinfo/parse_entry.c b/ncurses/tinfo/parse_entry.c
4f5567
index 2b54f45d..437f1223 100644
4f5567
--- a/ncurses/tinfo/parse_entry.c
4f5567
+++ b/ncurses/tinfo/parse_entry.c
4f5567
@@ -543,9 +543,11 @@ _nc_parse_entry(ENTRY * entryp, int literal, bool silent)
4f5567
 		 * Otherwise, look for a base entry that will already
4f5567
 		 * have picked up defaults via translation.
4f5567
 		 */
4f5567
-		for (i = 0; i < entryp->nuses; i++)
4f5567
-		    if (!strchr((char *) entryp->uses[i].name, '+'))
4f5567
+		for (i = 0; i < entryp->nuses; i++) {
4f5567
+		    if (entryp->uses[i].name != 0
4f5567
+			&& !strchr(entryp->uses[i].name, '+'))
4f5567
 			has_base_entry = TRUE;
4f5567
+		}
4f5567
 	    }
4f5567
 
4f5567
 	    postprocess_termcap(&entryp->tterm, has_base_entry);