[Bug 205697] vi gets confused and corrupts file being edited
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Mar 23 10:10:00 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=205697
--- Comment #4 from Bjorn Robertsson <bjornr at iceland2000.com> ---
(In reply to Michael Dexter from comment #3)
I have used this patch for 11.0, (from
https://lists.freebsd.org/pipermail/freebsd-bugs/2015-August/063464.html), but
note the couple more matches in the FreeBSD bug list:
New | 202740 | vi/ex string substitution problem when there is m
New | 202290 | /usr/bin/vi conversion error on valid character
Index: contrib/nvi/common/encoding.c
===================================================================
--- contrib/nvi/common/encoding.c (revision 292832)
+++ contrib/nvi/common/encoding.c (working copy)
@@ -96,7 +96,7 @@
if (i >= nbytes)
goto done;
- if (buf[i] & 0x40) /* 10xxxxxx */
+ if ((buf[i] & 0xc0) != 0x80) /* 10xxxxxx */
return -1;
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list