summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfm-x/pdfobj.c
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-08-04 22:22:18 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2019-08-04 22:22:18 +0000
commit7345e3d96db5fd95e0c8c79b2cee6d2e4d4610db (patch)
tree4e12664358d59579b35cd1418b836aa485ed56a9 /Build/source/texk/dvipdfm-x/pdfobj.c
parent8fe8e01cd9dc4177d5f98c145b2a3669f2e0ca73 (diff)
Ignore some of zlib errors. Fix a bug in -m option. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@51819 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfobj.c')
-rw-r--r--Build/source/texk/dvipdfm-x/pdfobj.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c
index a1acf1b5e25..50246fc7ede 100644
--- a/Build/source/texk/dvipdfm-x/pdfobj.c
+++ b/Build/source/texk/dvipdfm-x/pdfobj.c
@@ -2491,10 +2491,13 @@ filter_stream_decode_FlateDecode (const void *data, size_t len, struct decode_pa
for (;;) {
int status;
status = inflate(&z, Z_NO_FLUSH);
- if (status == Z_STREAM_END)
+ if (status == Z_STREAM_END) {
break;
- else if (status != Z_OK) {
- WARN("inflate() failed. Broken PDF file?");
+ } else if (status == Z_DATA_ERROR && z.avail_in == 0) {
+ WARN("Ignoring zlib error: status=%d, message=\"%s\"", status, z.msg);
+ break;
+ } else if (status != Z_OK) {
+ WARN("inflate() failed (status=%d, message=\"%s\").", status, z.msg);
inflateEnd(&z);
pdf_release_obj(tmp);
return NULL;