]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - progs/tic.c
ncurses 6.0 - patch 20160910
[ncurses.git] / progs / tic.c
index 134788994159e79bc62279d896ed6774e23ce4b0..22b6ea2a0d63d7536ef892eede5dacb4a53636e9 100644 (file)
@@ -48,7 +48,7 @@
 #include <parametrized.h>
 #include <transform.h>
 
-MODULE_ID("$Id: tic.c,v 1.221 2016/01/02 20:04:37 tom Exp $")
+MODULE_ID("$Id: tic.c,v 1.223 2016/09/05 00:27:13 tom Exp $")
 
 #define STDIN_NAME "<stdin>"
 
@@ -1776,7 +1776,9 @@ check_1_infotocap(const char *name, NCURSES_CONST char *value, int count)
     *next++ = '\0';
     for (k = 1; k <= NUM_PARM; k++) {
        numbers[k] = count;
-       sprintf(next, "XYZ%d", count);
+       _nc_SPRINTF(next,
+                   _nc_SLIMIT(sizeof(blob) - (next - blob))
+                   "XYZ%d", count);
        strings[k] = next;
        next += strlen(next) + 1;
     }
@@ -2274,7 +2276,7 @@ check_conflict(TERMTYPE *tp)
 static void
 check_exit_attribute(const char *name, char *test, char *trimmed, char *untrimmed)
 {
-    if (VALID_STRING(test)) {
+    if (VALID_STRING(test) && (trimmed != 0)) {
        if (similar_sgr(-1, trimmed, test) ||
            similar_sgr(-1, untrimmed, test)) {
            _nc_warning("%s matches exit_attribute_mode", name);