summaryrefslogtreecommitdiff
path: root/draw/draw_edge.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-06-11 15:50:30 +0100
committerRobin Watts <robin.watts@artifex.com>2012-06-11 19:55:53 +0100
commit120dabdf30be66b5d17f4c59862907bb5d176e27 (patch)
tree509ac66222e21248e98fd55eaf0408e098222878 /draw/draw_edge.c
parentb42125b79edc28af6508145a24308674403a8460 (diff)
downloadmupdf-120dabdf30be66b5d17f4c59862907bb5d176e27.tar.xz
Fix Bug 693099: Render failure due to corrupt jpeg data.
The file supplied with the bug contains corrupt jpeg data on page 61. This causes an error to be thrown which results in mudraw exiting. Previously, when image decode was done at loading time, the error would have been thrown under the pdf interpreter rather than under the display list renderer. This error would have been caught, a warning given, and the program would have continued. This is not ideal behaviour, as there is no way for a caller to know that there was a problem, and that the image is potentially incomplete. The solution adopted here, solves both these problems. The fz_cookie structure is expanded to include a 'errors' count. Whenever we meet an error during rendering, we increment the 'errors' count, and continue. This enables applications to spot the errors count being non-zero on exit and to display a warning. mupdf is updated here to pass a cookie in and to check the error count at the end; if it is found to be non zero, then a warning is given (just once per visit to each page) to say that the page may have errors on it.
Diffstat (limited to 'draw/draw_edge.c')
0 files changed, 0 insertions, 0 deletions