From: Timo Sirainen Date: Tue, 14 Oct 2014 16:22:40 +0000 (-0700) Subject: lib: i_stream_read_next_line() now sets a better error message if line is too long. X-Git-Tag: 2.2.14~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89c8d5f336e44cca091a1f588d51ba26e5145ad2;p=thirdparty%2Fdovecot%2Fcore.git lib: i_stream_read_next_line() now sets a better error message if line is too long. --- diff --git a/src/lib/istream.c b/src/lib/istream.c index 2ef0c2d514..bcf59a300f 100644 --- a/src/lib/istream.c +++ b/src/lib/istream.c @@ -425,6 +425,10 @@ char *i_stream_read_next_line(struct istream *stream) 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;