summaryrefslogtreecommitdiff
path: root/source/tools/pdfcreate.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/tools/pdfcreate.c')
-rw-r--r--source/tools/pdfcreate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/tools/pdfcreate.c b/source/tools/pdfcreate.c
index 032f32d5..aa0e246e 100644
--- a/source/tools/pdfcreate.c
+++ b/source/tools/pdfcreate.c
@@ -165,16 +165,22 @@ static void create_page(char *input)
{
s = fz_strsep(&p, " ");
t = fz_strsep(&p, " ");
+ if (!s || !t || !p)
+ fz_throw(ctx, FZ_ERROR_GENERIC, "Font directive missing arguments");
add_font_res(resources, s, t, p);
}
else if (!strcmp(s, "%%CJKFont"))
{
s = fz_strsep(&p, " ");
+ if (!s || !p)
+ fz_throw(ctx, FZ_ERROR_GENERIC, "CJKFont directive missing arguments");
add_cjkfont_res(resources, s, p);
}
else if (!strcmp(s, "%%Image"))
{
s = fz_strsep(&p, " ");
+ if (!s || !p)
+ fz_throw(ctx, FZ_ERROR_GENERIC, "Image directive missing arguments");
add_image_res(resources, s, p);
}
}