From d749d27d5725987dc95ae3ec9b176e13eaac3c43 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 15 Mar 2004 14:37:47 +0000 Subject: same as below for path. 2004-03-15 Not Zed * 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. svn path=/trunk/; revision=25068 --- camel/ChangeLog | 12 ++++++++++++ camel/camel-mime-parser.c | 4 +++- camel/camel-stream.c | 4 ++-- camel/providers/local/camel-local-store.c | 3 ++- camel/providers/local/camel-mbox-store.c | 3 ++- 5 files changed, 21 insertions(+), 5 deletions(-) (limited to 'camel') diff --git a/camel/ChangeLog b/camel/ChangeLog index 66a11c947d..3403f72f0a 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,17 @@ 2004-03-15 Not Zed + * 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 d3954c069c..2748b32502 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 (inptratleast = atleast; return -1; /* not found */ diff --git a/camel/camel-stream.c b/camel/camel-stream.c index bcc4640697..11eba1f816 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 a883f4a4dd..a009000f78 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 45d91b1fa6..e8c47c5672 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); -- cgit v1.2.3