summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir/pdftoepdf.cc')
-rw-r--r--Build/source/texk/web2c/pdftexdir/pdftoepdf.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
index d1da80bb3cc..fd1b5365cb5 100644
--- a/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
+++ b/Build/source/texk/web2c/pdftexdir/pdftoepdf.cc
@@ -447,13 +447,22 @@ static void copyFontResources(Object * obj)
static void copyOtherResources(Object * obj, char *key)
{
// copies all other resources (write_epdf handles Fonts and ProcSets),
- // but gives a warning if an object is not a dictionary.
- if (!obj->isDict())
+ // if Subtype is present, it must be a name
+ if (strcmp("Subtype", key) == 0) {
+ if (!obj->isName()) {
+ pdftex_warn("PDF inclusion: Subtype in Resources dict is not a name"
+ " (key '%s', type <%s>); ignored.",
+ key, obj->getTypeName());
+ return;
+ }
+ } else if (!obj->isDict()) {
//FIXME: Write the message only to the log file
pdftex_warn("PDF inclusion: invalid other resource which is no dict"
- " (key '%s', type <%s>); copying it anyway.",
+ " (key '%s', type <%s>); ignored.",
key, obj->getTypeName());
+ return;
+ }
copyName(key);
pdf_puts(" ");
copyObject(obj);