aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@novell.com>2004-11-16 01:39:28 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2004-11-16 01:39:28 +0800
commit25cd94c2c4960a9a361c57c10bb3438cb42d422d (patch)
tree9487e1b0d18771473286c812958ef1bfae23c526 /camel/providers
parentfc7bdaafa234947b4f139be4740c0849dd5b01cf (diff)
downloadgsoc2013-evolution-25cd94c2c4960a9a361c57c10bb3438cb42d422d.tar.gz
gsoc2013-evolution-25cd94c2c4960a9a361c57c10bb3438cb42d422d.tar.zst
gsoc2013-evolution-25cd94c2c4960a9a361c57c10bb3438cb42d422d.zip
Fix bug #69408 by filling our input buffer if inptr == inend.
2004-11-15 Jeffrey Stedfast <fejj@novell.com> * 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
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap4/camel-imap4-stream.c5
1 files changed, 4 insertions, 1 deletions
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;
}