summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/pdf/pdf-lex.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/pdf/pdf-lex.c b/source/pdf/pdf-lex.c
index 1301c64a..d02789a8 100644
--- a/source/pdf/pdf-lex.c
+++ b/source/pdf/pdf-lex.c
@@ -303,7 +303,7 @@ lex_string(fz_context *ctx, fz_stream *f, pdf_lexbuf *lb)
switch (c)
{
case EOF:
- goto end;
+ return PDF_TOK_ERROR;
case '(':
bal++;
*s++ = c;
@@ -319,7 +319,7 @@ lex_string(fz_context *ctx, fz_stream *f, pdf_lexbuf *lb)
switch (c)
{
case EOF:
- goto end;
+ return PDF_TOK_ERROR;
case 'n':
*s++ = '\n';
break;
@@ -414,8 +414,9 @@ lex_hex_string(fz_context *ctx, fz_stream *f, pdf_lexbuf *lb)
}
break;
case '>':
- case EOF:
goto end;
+ case EOF:
+ return PDF_TOK_ERROR;
default:
fz_warn(ctx, "ignoring invalid character in hex string");
}