git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix transport buffer size handling
[exim.git]
/
src
/
src
/
transport.c
diff --git
a/src/src/transport.c
b/src/src/transport.c
index 8ccdd03890121acf320f48f780e74e782254f2f2..a069b883364bc44522e6bd4f51ab5579982dcb13 100644
(file)
--- a/
src/src/transport.c
+++ b/
src/src/transport.c
@@
-1115,13
+1115,13
@@
DEBUG(D_transport)
if (!(tctx->options & topt_no_body))
{
if (!(tctx->options & topt_no_body))
{
-
int size = size_limit
;
+
unsigned long size = size_limit > 0 ? size_limit : ULONG_MAX
;
nl_check_length = abs(nl_check_length);
nl_partial_match = 0;
if (lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET) < 0)
return FALSE;
nl_check_length = abs(nl_check_length);
nl_partial_match = 0;
if (lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET) < 0)
return FALSE;
- while ( (len = M
AX
(DELIVER_IN_BUFFER_SIZE, size)) > 0
+ while ( (len = M
IN
(DELIVER_IN_BUFFER_SIZE, size)) > 0
&& (len = read(deliver_datafile, deliver_in_buffer, len)) > 0)
{
if (!write_chunk(tctx, deliver_in_buffer, len))
&& (len = read(deliver_datafile, deliver_in_buffer, len)) > 0)
{
if (!write_chunk(tctx, deliver_in_buffer, len))