aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/backend/ebook/evolution-vcard-importer.c10
2 files changed, 14 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 4d00f11361..e807dad1d8 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,8 @@
+2001-07-12 Jason Leach <jleach@ximian.com>
+
+ * backend/ebook/evolution-vcard-importer.c (support_format_fn):
+ Crash fix because strcmp() hates NULL arguments. Bug #3777.
+
2001-07-11 Jason Leach <jleach@ximian.com>
* gui/component/select-names/e-select-names.c (remove_cb): Added
diff --git a/addressbook/backend/ebook/evolution-vcard-importer.c b/addressbook/backend/ebook/evolution-vcard-importer.c
index 2864627a39..7a3a56fbd6 100644
--- a/addressbook/backend/ebook/evolution-vcard-importer.c
+++ b/addressbook/backend/ebook/evolution-vcard-importer.c
@@ -113,7 +113,9 @@ process_item_fn (EvolutionImporter *importer,
}
static char *supported_extensions[3] = {
- ".vcf", ".gcrd", NULL
+ ".vcf",
+ ".gcrd",
+ NULL
};
/* Actually check the contents of this file */
@@ -154,6 +156,12 @@ support_format_fn (EvolutionImporter *importer,
int i;
ext = strrchr (filename, '.');
+
+ /* Require an extension in order to strcmp with our list of
+ supported extensions */
+ if (ext == NULL)
+ return FALSE;
+
for (i = 0; supported_extensions[i] != NULL; i++) {
if (strcmp (supported_extensions[i], ext) == 0)
return check_file_is_vcard (filename);