diff options
author | Sushma Rai <rsushma@src.gnome.org> | 2005-08-05 15:54:40 +0800 |
---|---|---|
committer | Sushma Rai <rsushma@src.gnome.org> | 2005-08-05 15:54:40 +0800 |
commit | 8155bb609b124a40e5090bb66e0e178c6294fb76 (patch) | |
tree | 0a9ee0574559fb2168126a5842f2fd023d0fde2e | |
parent | 44f24cdf5a76bd8b6288cfa94e275453565c92f0 (diff) | |
download | gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.tar gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.tar.gz gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.tar.bz2 gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.tar.lz gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.tar.xz gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.tar.zst gsoc2013-evolution-8155bb609b124a40e5090bb66e0e178c6294fb76.zip |
Fix for the crash while importing ldif file with more than fifty entries.
svn path=/trunk/; revision=29998
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/importers/evolution-ldif-importer.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index dee8e999c6..deae14c922 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2005-03-05 Sushma Rai <rsushma@novell.com> + + * importers/evolution-ldif-importer.c (ldif_import): Initialize gci->size to + the file size, which is used for indicationg the import progress. Fixes the + crash due to devide by zero, while importing more than fifty contacts. + 2005-08-03 Jules Colding <colding@omesc.com> * gui/component/addressbook-view.c: Added forward references to functions that were diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index b989fb5385..4d36ddcd63 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -618,7 +618,8 @@ ldif_import(EImport *ei, EImportTarget *target, EImportImporter *im) gci->target = target; gci->book = book; gci->file = file; - gci->size = fseek(file, 0, SEEK_END); + fseek(file, 0, SEEK_END); + gci->size = ftell(file); fseek(file, 0, SEEK_SET); gci->dn_contact_hash = g_hash_table_new(g_str_hash, g_str_equal); |