From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: master 48af19c: Fix buffer overflow in ns_compute_glyph_string_overhangs Date: Fri, 05 Nov 2021 19:37:04 +0100 Message-ID: <8735oae9f3.fsf@gmx.de> References: <20211105023922.4023.62369@vcs0.savannah.gnu.org> <20211105023924.2CEBA209C7@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5193"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Daniel =?utf-8?Q?Mart=C3=ADn?= To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 05 19:38:35 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mj46i-00013C-GT for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 19:38:32 +0100 Original-Received: from localhost ([::1]:57690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj46h-0002Ib-8p for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 14:38:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj45Q-0000XH-Mk for emacs-devel@gnu.org; Fri, 05 Nov 2021 14:37:12 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:43361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj45N-0001iM-UC for emacs-devel@gnu.org; Fri, 05 Nov 2021 14:37:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1636137426; bh=8+vHvpapvcXiHz3YmzLCnXedJHC5Xvri/UAgw/jVpoY=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date; b=GUvDxhrIjlUvd6azSMToLF7sef9pcCOU1yIpZ5qKZLi+kq7c4NchZjIsEayMNi37x T1zGfJDItYmy4yjDdjWZUAoxFfn7Z2olkiUKBdpK6fgEQoeSFbO8KmVhLPIk4bdXUH afl7YKY1lzFktX007/5FkL9GFrY1zTa8ks335pq8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from gandalf.gmx.de ([213.220.156.81]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MkYXm-1mKPvD3l8Q-00m51x; Fri, 05 Nov 2021 19:37:06 +0100 X-Provags-ID: V03:K1:1TDpWDu0b63x2VS75HT0JvSjxsOZjDdp6//NTRpQ2nU9pPuYT9D 93fhghmHSHHfcsmqRkrEc8g8c9RsW9l+zXiCxYqZn1dLJDc2SofANKQDas+hjX6EewyGCx4 UQ2oKtij0kjHGpuhjUW4fZXpO9QqXlD2HHESGvhJBk0dgP7/IhySXiaIvLJzcsjIl7p4ewS drEQOrfQA6hZQEVNhkKAA== X-UI-Out-Filterresults: notjunk:1;V03:K0:ROYVig7z/Ww=:zNWRNNZKHUI+3DTkokT4bA EtdhxvddbRP4rv4iHQ1o74NqdFX8YixqnpqRaT3/1TOeVC8GdBrh6Jfmm8LHEPSBdpMa1IQxp rT3zhnhAF3S/9cPiv2GLyfAOTZsaFWIWTSczU7wrIlFgWKulbqQhDlkIpVeafWtAUT7FwHvX0 TcaNj+RbQOSK/GtohkKPHGVQNEWDEOZW3oEMn6Wt2wMo5Y4ZSzpHN2zyv4S4SlC9N+1Yq6uJb 9wW84uBfv43uTMYt7WPAUXyolPFnld2+3aOlKo/XXgjGcn620dU8foX/iUYdhECJYaJ9RVAR0 75y4kywdxQSC9/4Xwc1FOk+W/OfyfK1pxMk8NRzG/2Xu0mKoHVPcXABOiXOAMWFIU/44/sMXn OKqTsxAGP49VfHjuIn2fL/gQRFsB2Kw0/a/okwypRPnJE20yjIysJDc/ffgi2my9ma9UsaxQR pG5oJfhjplk5S3RSA7hGW+HDFOOfSJg1iaf8+b9DeRrzIboCsuCBqLoHmAovhkkAIJHzki9ZP ApPWIfTpuplMjW2oaJ+nJP/fEcJh8ffRUMOOfiTtObQkj3+AEv+/+GUXWa6rb9z7wkUvNU9mc XeEXFtj/QEVCqL5V9CrwegPThLx4PzjlIPYsvvjpqD7DccV/n7nfR95ATjya1Q9OLKnQqxRY1 fTWtHJXSrH8ErpXHmFMuwytGmfCcAs+FtU60PV5bJ/K2iFWADWRxLuogv62plDHgb/dJF+Da9 iaC39pBPHZaV9SVDK/dZsKphf8Jp5lPKCcoVyHLB4IZ3GpPmhRNNc6tySV23jhWGDwMVlrqo Received-SPF: pass client-ip=212.227.17.20; envelope-from=michael.albinus@gmx.de; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:278795 Archived-At: larsi@gnus.org (Lars Ingebrigtsen) writes: > branch: master > commit 48af19c1f06c2f3b20e4056bedf137a5e3c0e05e > Author: Daniel Mart=C3=ADn > Commit: Lars Ingebrigtsen > > Fix buffer overflow in ns_compute_glyph_string_overhangs > > * src/nsterm.m (ns_compute_glyph_string_overhangs): When the first > glyph of a glyph string is a composite glyph, `s->nchars' is 0, so > "s->char2b + s->nchars - 1" dereferenced a position before buffer > `s->char2b'. Instead, rewrite part of the function to distinguish > between character glyphs and composite glyphs. For character glyphs, > calculate the font metrics using the `text_extents' function, passing > it the entire glyph string; for composite glyphs, call > `composition_gstring_width'. (Bug#51105) > --- > src/nsterm.m | 29 ++++++++++++++++++----------- > 1 file changed, 18 insertions(+), 11 deletions(-) This breaks the compilation on emba, see for example . Best regards, Michael.