summaryrefslogtreecommitdiff
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-15 14:37:47 +0000
committerMichael Zucci <zucchi@src.gnome.org>2004-03-15 14:37:47 +0000
commitbdd5cee2daf0ec955134d11723a81a2ccccd5f9c (patch)
tree72d487d743dd5a6d32043f67da82162ef39e05d8 /camel
parentba365f265f44b1e26797da6c86d85d1b5c90c1a1 (diff)
downloadevolution-data-server-bdd5cee2daf0ec955134d11723a81a2ccccd5f9c.tar.gz
same as below for path.
2004-03-15 Not Zed <NotZed@Ximian.com> * providers/local/camel-mbox-store.c (delete_folder): same as below for path. * providers/local/camel-local-store.c (delete_folder): NULL out str before looking up the state file using it. Otherwise we double-free str. * camel-mime-parser.c (folder_scan_skip_line): we want to scan till in-end-1. If we've been called we're either at the end of data, or we know we have an end of line character within memory. Another case in Bug #53355.
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog12
-rw-r--r--camel/camel-mime-parser.c4
-rw-r--r--camel/camel-stream.c4
-rw-r--r--camel/providers/local/camel-local-store.c3
-rw-r--r--camel/providers/local/camel-mbox-store.c3
5 files changed, 21 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 66a11c947..3403f72f0 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,17 @@
2004-03-15 Not Zed <NotZed@Ximian.com>
+ * providers/local/camel-mbox-store.c (delete_folder): same as
+ below for path.
+
+ * providers/local/camel-local-store.c (delete_folder): NULL out
+ str before looking up the state file using it. Otherwise we
+ double-free str.
+
+ * camel-mime-parser.c (folder_scan_skip_line): we want to scan
+ till in-end-1. If we've been called we're either at the end of
+ data, or we know we have an end of line character within memory.
+ Another case in Bug #53355.
+
* providers/imap/camel-imap-folder.c (get_content, get_message):
set the mime-type field on the content the same way as
construct_from_stream does. Bug #55472.
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index d3954c069..2748b3250 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -1097,7 +1097,7 @@ folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
while ( (len = folder_read(s)) > 0 && len > s->atleast) { /* ensure we have at least enough room here */
inptr = s->inptr;
- inend = s->inend-1;
+ inend = s->inend;
c = -1;
while (inptr<inend
@@ -1117,6 +1117,8 @@ folder_scan_skip_line(struct _header_scan_state *s, GByteArray *save)
}
}
+ d(printf("couldn't find end of line?\n"));
+
s->atleast = atleast;
return -1; /* not found */
diff --git a/camel/camel-stream.c b/camel/camel-stream.c
index bcc464069..11eba1f81 100644
--- a/camel/camel-stream.c
+++ b/camel/camel-stream.c
@@ -114,7 +114,7 @@ camel_stream_write (CamelStream *stream, const char *buffer, size_t n)
{
g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
g_return_val_if_fail (n == 0 || buffer, -1);
-
+
return CS_CLASS (stream)->write (stream, buffer, n);
}
@@ -132,7 +132,7 @@ int
camel_stream_flush (CamelStream *stream)
{
g_return_val_if_fail (CAMEL_IS_STREAM (stream), -1);
-
+
return CS_CLASS (stream)->flush (stream);
}
diff --git a/camel/providers/local/camel-local-store.c b/camel/providers/local/camel-local-store.c
index a883f4a4d..a009000f7 100644
--- a/camel/providers/local/camel-local-store.c
+++ b/camel/providers/local/camel-local-store.c
@@ -399,7 +399,8 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
return;
}
g_free(str);
-
+
+ str = NULL;
camel_exception_init (&lex);
if ((lf = camel_store_get_folder (store, folder_name, 0, &lex))) {
camel_object_get (lf, NULL, CAMEL_OBJECT_STATE_FILE, &str, NULL);
diff --git a/camel/providers/local/camel-mbox-store.c b/camel/providers/local/camel-mbox-store.c
index 45d91b1fa..e8c47c567 100644
--- a/camel/providers/local/camel-mbox-store.c
+++ b/camel/providers/local/camel-mbox-store.c
@@ -301,7 +301,8 @@ delete_folder(CamelStore *store, const char *folder_name, CamelException *ex)
}
g_free(path);
-
+
+ path = NULL;
camel_exception_init(&lex);
if ((lf = camel_store_get_folder(store, folder_name, 0, &lex))) {
camel_object_get(lf, NULL, CAMEL_OBJECT_STATE_FILE, &path, NULL);