imap: Fixed calculation of transfer when partial FETCH received
authorSteve Holme <steve_holme@hotmail.com>
Sun, 8 Sep 2013 09:30:43 +0000 (10:30 +0100)
committerSteve Holme <steve_holme@hotmail.com>
Mon, 9 Sep 2013 06:40:38 +0000 (07:40 +0100)
commite20e48cbf2a93c0fba7b0018f37de2cacd4df19f
tree667525bec20b56209a6b2aa9428907247f2e969c
parentee5e2cf6cbe78da65275e7e08e78266b1686811a
imap: Fixed calculation of transfer when partial FETCH received

The transfer size would be calculated incorrectly if the email contained
within the FETCH response, had been partially received by the pingpong
layer. As such the following, example output, would be seen if the
amount remaining was smaller than the amount received:

* Excess found in a non pipelined read: excess = 1394, size = 262,
  maxdownload = 262, bytecount = 1374
* transfer closed with -1112 bytes remaining to read

Bug: http://curl.haxx.se/mail/lib-2013-08/0170.html
Reported-by: John Dunn
lib/imap.c