From e3a451cb33cad9dada930fd5111bcc6c341d5a2b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Tue, 16 Jan 2001 03:54:45 +0000 Subject: Chganged len back to be unsigned. And do a simple range check on the 2001-01-16 Not Zed * camel-folder-summary.c (camel_folder_summary_decode_string): Chganged len back to be unsigned. And do a simple range check on the string value to try and detect corrupted summary files. * providers/imap/camel-imap-command.c (imap_read_untagged): Handle cancelled stream reads with an appropriate exception. * providers/imap/camel-imap-private.h: Fix the include-once macro. Doh, confliced with camel-private.h. * providers/imap/camel-imap-store.c (imap_store_refresh_folders): A copy of camel_remote_store_refresh_folders. We avoid locking each folder when we call it though. This should be removed when i can work out how to remove the folder lock from this function easily. * camel-stream-fs.c (stream_write): Fix n' argument of select. (stream_read): Likewise. * camel-remote-store.c (socket_connect): Bump the connect timeout upto 4 minutes. (socket_connect): Oops, fix the 'n' argument of select. * camel-session.c (camel_cancel_cancel): If we are given no cancellation node, then do it for all active ones. svn path=/trunk/; revision=7526 --- camel/camel-folder-summary.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'camel/camel-folder-summary.c') diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c index 89b18e5141..8cea0a4666 100644 --- a/camel/camel-folder-summary.c +++ b/camel/camel-folder-summary.c @@ -1375,7 +1375,7 @@ camel_folder_summary_encode_string(FILE *out, const char *str) int camel_folder_summary_decode_string(FILE *in, char **str) { - gint32 len; + guint32 len; register char *ret; io(printf("Decode string ...\n", str)); @@ -1386,7 +1386,7 @@ camel_folder_summary_decode_string(FILE *in, char **str) } len--; - if (len < 0) { + if (len > 65536) { *str = NULL; io(printf("String = '%s'\n", *str)); return -1; -- cgit v1.2.3