Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/usr.bin/vi/common
On Friday, April 18, 2003, at 11:33 AM, Christos Zoulas wrote:
Log Message:
Recovery of vi files has been broken for a long while. This patch is a
stopgap measure to make vi recovery mostly functional on non-binary
files.
The problem is that the db holding the recovery file can become
corrupted,
in which case the data size of the line becomes huge. We use
heuristics to
correct the size when we load a db in recovery mode. We could use a
slightly
better heuristic (looking for ascii chars before correcting the
length),
but it is not worth it. Another way would have been to trap the SEGV
and
access data[len] and see if that worked, but that seemed exceedingly
ugly.
I think a better solution would be to prevent the DB from getting
corrupted in the first place!
-- Jason R. Thorpe <thorpej%wasabisystems.com@localhost>
Home |
Main Index |
Thread Index |
Old Index