Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/vi/common



Module Name:    src
Committed By:   christos
Date:           Fri Apr 18 18:33:42 UTC 2003

Modified Files:
        src/usr.bin/vi/common: line.c

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.


To generate a diff of this commit:
cvs rdiff -r1.4 -r1.5 src/usr.bin/vi/common/line.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index