Mercurial > dovecot > core-2.2
changeset 17947:a2c5aabc49a9
lib: i_stream_read_next_line() now sets a better error message if line is too long.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 14 Oct 2014 09:22:40 -0700 |
parents | e54bd2e1a767 |
children | c8fd499023ef |
files | src/lib/istream.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/istream.c Mon Oct 13 09:13:53 2014 -0700 +++ b/src/lib/istream.c Tue Oct 14 09:22:40 2014 -0700 @@ -425,6 +425,10 @@ switch (i_stream_read(stream)) { case -2: + io_stream_set_error(&stream->real_stream->iostream, + "Line is too long (over %"PRIuSIZE_T + " bytes at offset %"PRIuUOFF_T")", + i_stream_get_data_size(stream), stream->v_offset); stream->stream_errno = errno = ENOBUFS; stream->eof = TRUE; return NULL;