diff options
author | Not Zed <NotZed@Ximian.com> | 2004-01-29 16:54:15 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-01-29 16:54:15 +0800 |
commit | 1d8c2ddc164c6b4c90f58310b385655ccdd98667 (patch) | |
tree | 2ae059277d8f8cc5bc76763021b561bdaae55622 /camel/providers/nntp | |
parent | a96a5b74204b32b147e2cfacfec6c9d9e9ee2bf4 (diff) | |
download | gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar.gz gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar.bz2 gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar.lz gsoc2013-evolution-1d8c2ddc164c6b4c90f58310b385655ccdd98667.tar.xz 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/providers/nntp')
-rw-r--r-- | camel/providers/nntp/camel-nntp-store.c | 7 |
1 files changed, 3 insertions, 4 deletions
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); |