Closed
Bug 263801
Opened 21 years ago
Closed 21 years ago
Hang when importing invalid address book (csv file)
Categories
(Thunderbird :: Address Book, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird1.1
People
(Reporter: aptanner, Assigned: standard8)
References
Details
(Keywords: hang)
Attachments
(2 files)
|
5.09 KB,
patch
|
Bienvenu
:
review+
mscott
:
superreview+
|
Details | Diff | Splinter Review |
|
5.08 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9
Thunderbird version 0.8 (20040913):
Attempting to import an address book csv file containing the following section...
First Name, Last Name, Nickname, E-mail Address
John, Citizen, John, johnc@somewhere.com
"Jane," Citizen, Jane, janec@somewhere.com
Jim, Citizen, Jim, jimc@somewhere.com
...results in a hang when processing the "Jane," line. Source file is
obviously corrupt due to the comma within the quotes being discounted, but error
should be handled gracefully.
Reproducible: Always
Steps to Reproduce:
1.Open import dialog (Tools|Import)
2.Select "Address Books", "Text file", file location (see details for file),
column IDs
3.Click Ok to begin import
Actual Results:
Import process stops when it encounters the problem line and CPU usage pegs at
100%. Cancel button works but no error message is given.
Expected Results:
Report an invalid source file giving details (line#) and cancel import.
Updated•21 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Assignee | ||
Comment 1•21 years ago
|
||
I have a possible solution to this - I can stop the crash, just trying to
improve the actual import algorithm as well.
| Assignee | ||
Comment 2•21 years ago
|
||
*** Bug 279966 has been marked as a duplicate of this bug. ***
| Assignee | ||
Comment 3•21 years ago
|
||
Test case from duplicate bug 279966:
"Jamie,",Tester,Jamie Tester,,jamie@tester.com,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
| Assignee | ||
Comment 4•21 years ago
|
||
This patch has two parts. Firstly check for end of file whilst reading in
lines, if we have got to the end of file before a line is recongnised complete,
then that file is invalid, so return an error.
Secondly, revise the is line complete function so that it will take account of
quotes before the first delimiter. In doing so, it appears there is no point in
keeping track of if we have passed delimiters or not, so simply keep track of
the quotes.
I've tested it on both the two cases in this bug, and on a variety of my
current address books (tab and comma) for both mailnews & tb and they seem to
work ok.
| Assignee | ||
Comment 5•21 years ago
|
||
Just some housekeeping on flags.
Updated•21 years ago
|
Attachment #174075 -
Flags: review?(bienvenu) → review+
| Assignee | ||
Updated•21 years ago
|
Attachment #174075 -
Flags: superreview?(mscott)
Comment 6•21 years ago
|
||
Comment on attachment 174075 [details] [diff] [review]
Patch for fix.
+ if (isEof == PR_TRUE)
that can just be
if (isEof)
Attachment #174075 -
Flags: superreview?(mscott) → superreview+
| Assignee | ||
Comment 7•21 years ago
|
||
This patch fixes the nit that scott raised.
| Assignee | ||
Comment 8•21 years ago
|
||
Fix checked in by timeless:
2005-02-24 08:11 timeless%mozdev.org mozilla/ mailnews/ import/ text/ src/
nsTextAddress.h 1.11 1/1
2005-02-24 08:11 timeless%mozdev.org mozilla/ mailnews/ import/ text/ src/
nsTextAddress.cpp 1.43 22/38
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird1.1
You need to log in
before you can comment on or make changes to this bug.
Description
•