aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-01-29 16:54:15 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-01-29 16:54:15 +0800
commit1d8c2ddc164c6b4c90f58310b385655ccdd98667 (patch)
tree2ae059277d8f8cc5bc76763021b561bdaae55622 /camel
parenta96a5b74204b32b147e2cfacfec6c9d9e9ee2bf4 (diff)
downloadgsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar.gz
gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar.zst
gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.zip
** See bug #53269.
2004-01-29 Not Zed <NotZed@Ximian.com> ** See bug #53269. * providers/nntp/camel-nntp-store.c (nntp_store_get_cached_folder_info): don't dereference last before checking if its null. svn path=/trunk/; revision=24514
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/nntp/camel-nntp-store.c7
2 files changed, 9 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index b5ad5d1ceb..b828328a7d 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,11 @@
2004-01-29 Not Zed <NotZed@Ximian.com>
+ ** See bug #53269.
+
+ * providers/nntp/camel-nntp-store.c
+ (nntp_store_get_cached_folder_info): don't dereference last before
+ checking if its null.
+
* camel-object.c (camel_object_bag_rekey): added a doc comment.
** See bug #53520.
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index a439c4fd8a..77fbd59fe8 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -496,7 +496,7 @@ nntp_store_get_subscribed_folder_info (CamelNNTPStore *store, const char *top, g
static CamelFolderInfo *
nntp_store_get_cached_folder_info (CamelNNTPStore *store, const char *orig_top, guint flags, CamelException *ex)
{
- int len, i;
+ int i;
int subscribed_or_flag = (flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED) ? 0 : 1,
root_or_flag = (orig_top == NULL || orig_top[0] == '\0') ? 1 : 0,
recursive_flag = flags & CAMEL_STORE_FOLDER_INFO_RECURSIVE;
@@ -522,10 +522,9 @@ nntp_store_get_cached_folder_info (CamelNNTPStore *store, const char *orig_top,
/* apparently, this is an indirect subitem. if it's not a subitem of
the item we added last, we need to add a portion of this item to
the list as a placeholder */
- len = strlen (last->full_name);
if (!last ||
- g_ascii_strncasecmp(si->path, last->full_name, len) != 0 ||
- si->path[len] != '.') {
+ g_ascii_strncasecmp(si->path, last->full_name, strlen(last->full_name)) != 0 ||
+ si->path[strlen(last->full_name)] != '.') {
tmpname = g_strdup(si->path);
*(strchr(tmpname + toplen, '.')) = '\0';
fi = nntp_folder_info_from_name(store, FALSE, tmpname);