From 1442e29647323dd52b3ab7b966514c3e205c17d4 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 22 Sep 2004 01:12:11 +0000 Subject: handle a zero-length token read rather than failing. 2004-09-22 Not Zed * camel-folder-summary.c (camel_folder_summary_decode_token): handle a zero-length token read rather than failing. svn path=/trunk/; revision=27327 --- camel/camel-folder-summary.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index ccbe13b22d..fdffcff8fe 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -1363,7 +1363,7 @@ camel_folder_summary_decode_token(FILE *in, char **str) } else { len -= 32; ret = g_malloc(len+1); - if (fread(ret, len, 1, in) != 1) { + if (len > 0 && fread(ret, len, 1, in) != 1) { g_free(ret); *str = NULL; return -1; -- cgit