]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/read_entry.c
ncurses 6.2 - patch 20210821
[ncurses.git] / ncurses / tinfo / read_entry.c
index 9741e103b7a9d3f954c90a9a7086ef631173a05c..41ef0d0aa2136e6e56ef9a41d8aceace8156d0db 100644 (file)
@@ -42,7 +42,7 @@
 
 #include <tic.h>
 
-MODULE_ID("$Id: read_entry.c,v 1.159 2021/02/14 00:17:09 tom Exp $")
+MODULE_ID("$Id: read_entry.c,v 1.161 2021/06/26 19:43:17 tom Exp $")
 
 #define TYPE_CALLOC(type,elts) typeCalloc(type, (unsigned)(elts))
 
@@ -552,7 +552,7 @@ _nc_read_file_entry(const char *const filename, TERMTYPE2 *ptr)
     int code;
 
     if (_nc_access(filename, R_OK) < 0
-       || (fp = fopen(filename, BIN_R)) == 0) {
+       || (fp = safe_fopen(filename, BIN_R)) == 0) {
        TR(TRACE_DATABASE, ("cannot open terminfo %s (errno=%d)", filename, errno));
        code = TGETENT_NO;
     } else {
@@ -774,7 +774,7 @@ _nc_read_tic_entry(char *filename,
         * looking for compiled (binary) terminfo data.
         *
         * cgetent uses a two-level lookup.  On the first it uses the given
-        * name to return a record containing only the aliases for an entry. 
+        * name to return a record containing only the aliases for an entry.
         * On the second (using that list of aliases as a key), it returns the
         * content of the terminal description.  We expect second lookup to
         * return data beginning with the same set of aliases.
@@ -831,7 +831,7 @@ _nc_read_tic_entry(char *filename,
 #endif /* NCURSES_USE_DATABASE */
 
 /*
- * Find and read the compiled entry for a given terminal type, if it exists. 
+ * Find and read the compiled entry for a given terminal type, if it exists.
  * We take pains here to make sure no combination of environment variables and
  * terminal type name can be used to overrun the file buffer.
  */