summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/xdvipdfmx/src/spc_pdfm.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/spc_pdfm.c b/Build/source/texk/xdvipdfmx/src/spc_pdfm.c
index e9ec3d3503f..204d695f8ef 100644
--- a/Build/source/texk/xdvipdfmx/src/spc_pdfm.c
+++ b/Build/source/texk/xdvipdfmx/src/spc_pdfm.c
@@ -1469,7 +1469,7 @@ spc_handler_pdfm_stream_with_type (struct spc_env *spe, struct spc_arg *args, in
{
pdf_obj *fstream;
long nb_read;
- char *ident, *instring;
+ char *ident, *instring, *fullname;
pdf_obj *tmp;
FILE *fp;
@@ -1505,11 +1505,19 @@ spc_handler_pdfm_stream_with_type (struct spc_env *spe, struct spc_arg *args, in
RELEASE(ident);
return -1;
}
- fp = DPXFOPEN(instring, DPX_RES_TYPE_BINARY);
+ fullname = kpse_find_pict(instring);
+ if (!fullname) {
+ spc_warn(spe, "File \"%s\" not found.", instring);
+ pdf_release_obj(tmp);
+ RELEASE(ident);
+ return -1;
+ }
+ fp = DPXFOPEN(fullname, DPX_RES_TYPE_BINARY);
if (!fp) {
spc_warn(spe, "Could not open file: %s", instring);
pdf_release_obj(tmp);
RELEASE(ident);
+ RELEASE(fullname);
return -1;
}
fstream = pdf_new_stream(STREAM_COMPRESS);