christos
c0b1f367f4
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.
…
…
…
…
…
Description
No description provided
Languages
C
85.3%
Roff
7.2%
Assembly
3.1%
Shell
1.7%
Makefile
1.2%
Other
0.9%