diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2011-05-31 15:49:39 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-05-31 17:28:21 +0200 |
commit | 97b83d84e3d10ccd298f9c54713323a3e41ce7f3 (patch) | |
tree | 4877fbe7f4d2afff109b3bafa11bed6c013afd5b /pdf/pdf_function.c | |
parent | 89bf9896bd9d05500ac6494452a1b9d9cf8a67cb (diff) | |
download | mupdf-97b83d84e3d10ccd298f9c54713323a3e41ce7f3.tar.xz |
Fix assert in scale: see Bug 692245.
Bug 692245 gives a file that produces a runtime assert in mupdf due to an
extremely large ctm offset (unrepresentable in a float). We fix our code
here so that such floats are always read as 1.0.
In this particular case, the exact value read doesn't seem to matter. We
match acrobat. We pick 1.0 rather than 0.0 as this is less likely to
provoke division by 0 errors later on.
Diffstat (limited to 'pdf/pdf_function.c')
-rw-r--r-- | pdf/pdf_function.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_function.c b/pdf/pdf_function.c index 6237bd42..c1132365 100644 --- a/pdf/pdf_function.c +++ b/pdf/pdf_function.c @@ -714,7 +714,7 @@ parse_code(pdf_function *func, fz_stream *stream, int *codeptr) case PDF_TOK_REAL: resize_code(func, *codeptr); func->u.p.code[*codeptr].type = PS_REAL; - func->u.p.code[*codeptr].u.f = atof(buf); + func->u.p.code[*codeptr].u.f = fz_atof(buf); ++*codeptr; break; |