Comment 22 for bug 270429

Revision history for this message
In , Dolske (dolske) wrote :

Created attachment 339502
Patch v.1

The core fix here is to wrap the charset conversion in a try/catch. The tricky bit is deciding what to do with a corrupted entry...

One option is to do nothing, and keep it around. It won't get used anywhere, but it's a safe and minimal change.

The other option is to flag corrupted entries, and drop them when loading the file. This makes for tidy housekeeping, but adds complexity, risk, and more to test. The particular risk here is a "drop this entry" code path adds the possibility of having a bug that results in more dataloss (eg, forgetting to reset the "drop this entry" flag, and dropping all following entries).

I've implemented the second option here (untested!), but I'm sort of leaning towards just doing the first option instead.

Gavin, thoughts?