diff options
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/camel-folder-summary.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 3b630aaf6b..cd755a5659 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2004-09-22 Not Zed <NotZed@Ximian.com> + + * camel-folder-summary.c (camel_folder_summary_decode_token): + handle a zero-length token read rather than failing. + 2004-09-21 Not Zed <NotZed@Ximian.com> ** See bug #66199. 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; |