texlive[56417] Build/source/texk/web2c/lib: Call kpse_in_name_ok() in

commits+kakuto at tug.org commits+kakuto at tug.org
Thu Sep 24 02:30:16 CEST 2020


Revision: 56417
          http://tug.org/svn/texlive?view=revision&revision=56417
Author:   kakuto
Date:     2020-09-24 02:30:16 +0200 (Thu, 24 Sep 2020)
Log Message:
-----------
Call kpse_in_name_ok() in find_input_file() for getfilemoddate() etc.

Modified Paths:
--------------
    trunk/Build/source/texk/web2c/lib/ChangeLog
    trunk/Build/source/texk/web2c/lib/texmfmp.c

Modified: trunk/Build/source/texk/web2c/lib/ChangeLog
===================================================================
--- trunk/Build/source/texk/web2c/lib/ChangeLog	2020-09-23 23:54:44 UTC (rev 56416)
+++ trunk/Build/source/texk/web2c/lib/ChangeLog	2020-09-24 00:30:16 UTC (rev 56417)
@@ -1,3 +1,8 @@
+2020-09-24  Akira Kakuto  <kakuto at w32tex.org>
+
+	* texmfmp.c: Call kpse_in_name_ok() in find_input_file() for
+	getfilemoddate(), getfilesize(), getfiledump() and getmd5sum().
+
 2020-08-28  Karl Berry  <karl at tug.org>
 
 	* texmfmp.c (input_line): always clear errno before calling getc,

Modified: trunk/Build/source/texk/web2c/lib/texmfmp.c
===================================================================
--- trunk/Build/source/texk/web2c/lib/texmfmp.c	2020-09-23 23:54:44 UTC (rev 56416)
+++ trunk/Build/source/texk/web2c/lib/texmfmp.c	2020-09-24 00:30:16 UTC (rev 56417)
@@ -3303,6 +3303,9 @@
         }
         xfree (pathname);
     }
+    if (! kpse_in_name_ok(filename)) {
+       return NULL;                /* no permission */
+    }
     return kpse_find_tex(filename);
 }
 
@@ -3397,9 +3400,6 @@
     if (file_name == NULL) {
         return;                 /* empty string */
     }
-    if (! kpse_in_name_ok(file_name)) {
-       return;                  /* no permission */
-    }
 
     recorder_record_input(file_name);
     /* get file status */
@@ -3442,9 +3442,6 @@
     if (file_name == NULL) {
         return;                 /* empty string */
     }
-    if (! kpse_in_name_ok(file_name)) {
-       return;                  /* no permission */
-    }
 
     recorder_record_input(file_name);
     /* get file status */
@@ -3510,9 +3507,6 @@
     if (file_name == NULL) {
         return;                 /* empty string */
     }
-    if (! kpse_in_name_ok(file_name)) {
-       return;                  /* no permission */
-    }
 
     /* read file data */
     f = fopen(file_name, FOPEN_RBIN_MODE);
@@ -3602,9 +3596,6 @@
         if (file_name == NULL) {
             return;             /* empty string */
         }
-        if (! kpse_in_name_ok(file_name)) {
-           return;              /* no permission */
-        }
 
         /* in case of error the empty string is returned,
            no need for xfopen that aborts on error.



More information about the tex-live-commits mailing list.