summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kaiser <patheticpat@googlemail.com>2011-03-26 15:06:56 +0100
committerTor Andersson <tor.andersson@artifex.com>2011-03-27 20:57:54 +0200
commit715f105e6e59b451812b73f758fbc874be681207 (patch)
tree79a31d69e1bcc042401acc8c150a809a38a2703c
parent3dfc6934f9a0e355991a021ba995686714975499 (diff)
downloadmupdf-715f105e6e59b451812b73f758fbc874be681207.tar.xz
Set the result pointer after swapping buffers.
In the CCITTFaxDecode filter, the result pointer was reset before swapping the buffers, so each line was copied to the output buffer only after decoding the following line. This was leading to a duplication of the first line and a missing last line.
-rw-r--r--fitz/filt_faxd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fitz/filt_faxd.c b/fitz/filt_faxd.c
index 5da826ae..714629e7 100644
--- a/fitz/filt_faxd.c
+++ b/fitz/filt_faxd.c
@@ -625,14 +625,15 @@ eol:
if (fax->rp < fax->wp)
return p - buf;
- fax->rp = fax->dst;
- fax->wp = fax->dst + fax->stride;
tmp = fax->ref;
fax->ref = fax->dst;
fax->dst = tmp;
memset(fax->dst, 0, fax->stride);
+ fax->rp = fax->dst;
+ fax->wp = fax->dst + fax->stride;
+
fax->stage = SNORMAL;
fax->c = 0;
fax->a = -1;