From 25cd94c2c4960a9a361c57c10bb3438cb42d422d Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 15 Nov 2004 17:39:28 +0000 Subject: Fix bug #69408 by filling our input buffer if inptr == inend. 2004-11-15 Jeffrey Stedfast * providers/imap4/camel-imap4-stream.c (camel_imap4_stream_line): Fix bug #69408 by filling our input buffer if inptr == inend. svn path=/trunk/; revision=27924 --- camel/providers/imap4/camel-imap4-stream.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'camel/providers/imap4') diff --git a/camel/providers/imap4/camel-imap4-stream.c b/camel/providers/imap4/camel-imap4-stream.c index 32d1a20b40..4a48fe5cf2 100644 --- a/camel/providers/imap4/camel-imap4-stream.c +++ b/camel/providers/imap4/camel-imap4-stream.c @@ -631,7 +631,10 @@ camel_imap4_stream_line (CamelIMAP4Stream *stream, unsigned char **line, size_t g_return_val_if_fail (line != NULL, -1); g_return_val_if_fail (len != NULL, -1); - if ((stream->inend - stream->inptr) < 2 && *stream->inptr != '\n') { + inptr = stream->inptr; + inend = stream->inend; + + if (inptr == inend || ((inend - inptr) < 2 && *inptr != '\n')) { if (imap4_fill (stream) == -1 && stream->inptr == stream->inend) return -1; } -- cgit v1.2.3