From owner-svn-src-stable@freebsd.org Thu Nov 29 15:08:00 2018 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DF51114021B; Thu, 29 Nov 2018 15:08:00 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2F876FC9D; Thu, 29 Nov 2018 15:07:59 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91D721B241; Thu, 29 Nov 2018 15:07:59 +0000 (UTC) (envelope-from yuripv@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wATF7xWl083311; Thu, 29 Nov 2018 15:07:59 GMT (envelope-from yuripv@FreeBSD.org) Received: (from yuripv@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wATF7xRU083310; Thu, 29 Nov 2018 15:07:59 GMT (envelope-from yuripv@FreeBSD.org) Message-Id: <201811291507.wATF7xRU083310@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: yuripv set sender to yuripv@FreeBSD.org using -f From: Yuri Pankov Date: Thu, 29 Nov 2018 15:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r341235 - stable/11/contrib/nvi/common X-SVN-Group: stable-11 X-SVN-Commit-Author: yuripv X-SVN-Commit-Paths: stable/11/contrib/nvi/common X-SVN-Commit-Revision: 341235 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: B2F876FC9D X-Spamd-Result: default: False [0.65 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_SPAM_LONG(0.26)[0.262,0]; NEURAL_SPAM_SHORT(0.20)[0.198,0]; NEURAL_SPAM_MEDIUM(0.19)[0.193,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 15:08:00 -0000 Author: yuripv Date: Thu Nov 29 15:07:59 2018 New Revision: 341235 URL: https://svnweb.freebsd.org/changeset/base/341235 Log: MFC r340976: vi: fix UTF-8 detection. PR: 202290 Submitted by: lampa@fit.vutbr.cz Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D17950 Modified: stable/11/contrib/nvi/common/encoding.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/nvi/common/encoding.c ============================================================================== --- stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:05:47 2018 (r341234) +++ stable/11/contrib/nvi/common/encoding.c Thu Nov 29 15:07:59 2018 (r341235) @@ -96,7 +96,7 @@ looks_utf8(const char *ibuf, size_t nbytes) if (i >= nbytes) goto done; - if (buf[i] & 0x40) /* 10xxxxxx */ + if ((buf[i] & 0xc0) != 0x80) /* 10xxxxxx */ return -1; }