evolution-data-server r9193 - in trunk/camel: . providers/imap



Author: mcrha
Date: Fri Jul 25 18:00:20 2008
New Revision: 9193
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9193&view=rev

Log:
2008-07-25  Milan Crha  <mcrha redhat com>

	** Fix for bug #544049

	* camel/camel-object.c: Initialize global variables, just to be sure.

	* camel/providers/imap/camel-imap-summary.c: (EXTRACT_DIGIT): Do not read beyond the buffer.
	* camel/providers/imap/camel-imap-folder.c: (merge_custom_flags): Pass proper pointer to
	the 'camel_flag_set' function, otherwise it messes things.



Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-object.c
   trunk/camel/providers/imap/ChangeLog
   trunk/camel/providers/imap/camel-imap-folder.c
   trunk/camel/providers/imap/camel-imap-summary.c

Modified: trunk/camel/camel-object.c
==============================================================================
--- trunk/camel/camel-object.c	(original)
+++ trunk/camel/camel-object.c	Fri Jul 25 18:00:20 2008
@@ -142,8 +142,8 @@
 static GHashTable *type_table;
 
 /* fundamental types are accessed via global */
-CamelType camel_object_type;
-CamelType camel_interface_type;
+CamelType camel_object_type = CAMEL_INVALID_TYPE;
+CamelType camel_interface_type = CAMEL_INVALID_TYPE;
 
 #define P_LOCK(l) (pthread_mutex_lock(&l))
 #define P_UNLOCK(l) (pthread_mutex_unlock(&l))

Modified: trunk/camel/providers/imap/camel-imap-folder.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-folder.c	(original)
+++ trunk/camel/providers/imap/camel-imap-folder.c	Fri Jul 25 18:00:20 2008
@@ -792,7 +792,7 @@
 			/* If this value came from the server, then add it to our local summary,
 			   otherwise it was in local summary, but isn't on the server, thus remove it. */
 			changed = TRUE;
-			camel_flag_set (mi, p->data, g_hash_table_lookup (server, p->data) != NULL);
+			camel_flag_set (&((CamelMessageInfoBase *)mi)->user_flags, p->data, g_hash_table_lookup (server, p->data) != NULL);
 			((CamelMessageInfoBase *) mi)->flags |= CAMEL_MESSAGE_FOLDER_FLAGGED;
 		}
 	}

Modified: trunk/camel/providers/imap/camel-imap-summary.c
==============================================================================
--- trunk/camel/providers/imap/camel-imap-summary.c	(original)
+++ trunk/camel/providers/imap/camel-imap-summary.c	Fri Jul 25 18:00:20 2008
@@ -40,7 +40,7 @@
 #define CAMEL_IMAP_SUMMARY_VERSION (3)
 
 #define EXTRACT_FIRST_DIGIT(val) val=strtoul (part, &part, 10);
-#define EXTRACT_DIGIT(val) part++; val=strtoul (part, &part, 10);
+#define EXTRACT_DIGIT(val) if (*part) part++; val=strtoul (part, &part, 10);
 
 static int summary_header_load (CamelFolderSummary *, FILE *);
 static int summary_header_save (CamelFolderSummary *, FILE *);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]