summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-09-24 00:30:16 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2020-09-24 00:30:16 +0000
commitfe8fb6e7506ea00fe991228bee7bf28aa36d4f18 (patch)
tree45eea334f25901cf943684b98dc7863a207e415e /Build
parent7c7b18f0450d4122d71e5a3c187315502f20ef0c (diff)
Call kpse_in_name_ok() in find_input_file() for getfilemoddate() etc.
git-svn-id: svn://tug.org/texlive/trunk@56417 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog5
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c15
2 files changed, 8 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 221273b2673..2a1ff968b22 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,8 @@
+2020-09-24 Akira Kakuto <kakuto@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@tug.org>
* texmfmp.c (input_line): always clear errno before calling getc,
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 1502a113b8d..983d44bd903 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -3303,6 +3303,9 @@ find_input_file(integer s)
}
xfree (pathname);
}
+ if (! kpse_in_name_ok(filename)) {
+ return NULL; /* no permission */
+ }
return kpse_find_tex(filename);
}
@@ -3397,9 +3400,6 @@ getfilemoddate(integer s)
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 @@ getfilesize(integer s)
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 @@ getfiledump(integer s, int offset, int length)
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 @@ getmd5sum(strnumber s, boolean file)
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.