** Fix for bug #544049
authorMilan Crha <mcrha@redhat.com>
Fri, 25 Jul 2008 18:00:20 +0000 (18:00 +0000)
committerMilan Crha <mcrha@src.gnome.org>
Fri, 25 Jul 2008 18:00:20 +0000 (18:00 +0000)
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.

svn path=/trunk/; revision=9193

camel/ChangeLog
camel/camel-object.c
camel/providers/imap/ChangeLog
camel/providers/imap/camel-imap-folder.c
camel/providers/imap/camel-imap-summary.c

index a41451f..6518620 100644 (file)
@@ -1,5 +1,11 @@
 2008-07-25  Milan Crha  <mcrha@redhat.com>
 
+       ** Part of fix for bug #544049
+
+       * camel-object.c: Initialize global variables, just to be sure.
+
+2008-07-25  Milan Crha  <mcrha@redhat.com>
+
        ** Fix for bug #544651
 
        * camel-folder-summary.c: (EXTRACT_FIRST_STRING), (EXTRACT_STRING):
index 8f0e520..b149edc 100644 (file)
@@ -142,8 +142,8 @@ static GMutex *ref_lock;
 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))
index 2911f39..bea5582 100644 (file)
@@ -1,3 +1,11 @@
+2008-07-25  Milan Crha  <mcrha@redhat.com>
+
+       ** Fix for bug #544049
+
+       * camel-imap-summary.c: (EXTRACT_DIGIT): Do not read beyond the buffer.
+       * camel-imap-folder.c: (merge_custom_flags): Pass proper pointer to
+       the 'camel_flag_set' function, otherwise it messes things.
+
 2008-07-23  Milan Crha  <mcrha@redhat.com>
 
        ** Part of fix for bug #543943
index faca3e0..0307298 100644 (file)
@@ -792,7 +792,7 @@ merge_custom_flags (CamelMessageInfo *mi, const char *custom_flags)
                        /* 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;
                }
        }
index 426e158..9c1e468 100644 (file)
@@ -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 *);