aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder-summary.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-09-22 09:12:11 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-09-22 09:12:11 +0800
commit1442e29647323dd52b3ab7b966514c3e205c17d4 (patch)
tree641842fab04f8edb9cbf831a140d32dce9b04098 /camel/camel-folder-summary.c
parent6154276434c5616201d022079107af590b130c7e (diff)
downloadgsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.tar
gsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.tar.gz
gsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.tar.bz2
gsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.tar.lz
gsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.tar.xz
gsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.tar.zst
gsoc2013-evolution-1442e29647323dd52b3ab7b966514c3e205c17d4.zip
handle a zero-length token read rather than failing.
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. svn path=/trunk/; revision=27327
Diffstat (limited to 'camel/camel-folder-summary.c')
-rw-r--r--camel/camel-folder-summary.c2
1 files changed, 1 insertions, 1 deletions
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;