Blame SOURCES/ncurses-usecap.patch

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