From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Daniel_Mart=C3=ADn?= Newsgroups: gmane.emacs.devel Subject: Re: master 48af19c: Fix buffer overflow in ns_compute_glyph_string_overhangs Date: Fri, 05 Nov 2021 21:11:48 +0100 Message-ID: References: <20211105023922.4023.62369@vcs0.savannah.gnu.org> <20211105023924.2CEBA209C7@vcs0.savannah.gnu.org> <8735oae9f3.fsf@gmx.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39403"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) Cc: emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 05 21:13:31 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 1mj5ac-000A2E-SM for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 21:13:31 +0100 Original-Received: from localhost ([::1]:55350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj5ab-0002sG-0m for ged-emacs-devel@m.gmane-mx.org; Fri, 05 Nov 2021 16:13:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57868) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj5Z8-0001v6-Rz for emacs-devel@gnu.org; Fri, 05 Nov 2021 16:11:58 -0400 Original-Received: from sonic304-23.consmr.mail.ir2.yahoo.com ([77.238.179.148]:45779) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mj5Z5-00039a-5o for emacs-devel@gnu.org; Fri, 05 Nov 2021 16:11:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1636143110; bh=lukOQdyJ+hT5P+YbvJvB8AmLYeDHAWbOwzlb7ze3BIs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=KVXMhUOYhw6tCMTKEAfMstCSygYR24v6m5vtOBw1smtiw28dbmTBTVTGgUOnGlk9ircFGUZKQiQ+dtzNdqdi/zXsX5YxzPilgQUMCFF6txGGybYRmgFAMtvxFLRneoxe8QUN+6Ga9dgUiSrvS4257eRy4pX4z/xJQtHlmaIjU78MMAhFMUT7f69U0bjSs907zR7o1eK0nre/TZbSkSTDADVL670C6dNfNPxqHvHXqFKzXPG1QbjyzBOumEmKsa7/8oeWiIoVu93Oxsucjq/5NVN5DxSsAzDA5x2M+dv8E4GcWOKVedP9R+pXlZEJftqEJKzkl4rDojxpytkzglyr1A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636143110; bh=jbb98jmJ773Ywm0IYy1EeFi/bM+rvDhJg3gKDG7GZot=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=DUeizqowEWafEbomMoaK0wEnZaYO9Dfuevhqy/tdCmTy0xETcrMJGBMT/kyni4diQMtQDhHPmzTJAl02ELDRwvHsV/HknRkQbwmhhHkZH3+imT1llBMuqGZKpTlzkYqzcYUrc0HxjO0uceszDEDRdPIUpaPGPNkF+C/MuuKSjperPx9koEp8YdhZ9pUJcWJ3ytx/7drxpwU6ylci4Xg5kPsZY9O9Vc8rj1U7Rs9msMfNtzbFV4woaxVpr2Vk5ONtzV6q5MlzgynUs5lgbxCQQzoOxJAqO/v5rYKSvCNLrjeEfYUJgBcTlYk7SifmQ3D/W2olUFVa0mlaCkyH7AtFAQ== X-YMail-OSG: UEbffq8VM1mw1k4ujzEOdY8HgA9.NXBpUp6_LUBGfJ839S9JX6FpS04B3V3agRZ _I5kpK1AzsTTIJgyNoOoB330XjMmfH0NVo1RM1PAtdUgePGyXMzA6TTe33tbd1MmGOITnsa0CqTs twCfZjzw94QyA3KrNjEmc.HeJADvb0TTB0v4AHevIfFebPeEn5vUMrOeIYrP3YBbW_vGdgvbvbtf UFhVTiPvU5JSymP8p.lv_oBWzK9scfy_LkYD3I0T5BJOjwrAJ6I_2Hn9j9z7En3dRWQFKBKhsnpa nIdbPdzqWjLygGePtxMihshr8t7bSrnNcxDGuIIaObw2kObfsTVbxINVQ9Fz7.jGsoFcRozf5w2P bVMTPuiWyZRlw8ngFgKdXMAk8ZWxoVyAQ2ljflmp0JtqKj49RyZlIxX1.tFJy9adhLgSTovBv1FI HlpUXa_KqKk17AyfhP08_w33xxrc8BySupx4j6HaBWhk7J1xrFW6g2eUxcf3do4jcBHgO2zKSXEm egRfB9oGEwMF0EFuVcM0mQ5xOiE.os7Q35kEXg0kLNBs9gFco_qjR4sWJZJoWSxsP7oUMNtyPq2i _BubN6ue.VmRewSfKEXZZ2UwSvXL16BAmZlhzk67Qhq9qspCzB.vUHXkmMgnKbqcHZmsX23zxcQx n.SeyHbd1UEPoOfbd3J18TK3npzAids_LdbkcSAKvdrkIMNYZZ82UsPouqfEa6bQctaxgQpEL1mR IPaAnKcexoy6H8Dhpk9d0EPRPlf_Pl0kG_SZfZq4Y6QBQxnHMZgNm5Dyz6xByV3WIE8kOWY43RxQ 3G_g13rjEgvVACK.y3AX.nwXoXP5HgwRcxiIu1.pJH X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.ir2.yahoo.com with HTTP; Fri, 5 Nov 2021 20:11:50 +0000 Original-Received: by kubenode506.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID da3f6b78375c55484a37ccb3d7ff1541; Fri, 05 Nov 2021 20:11:49 +0000 (UTC) In-Reply-To: <8735oae9f3.fsf@gmx.de> (Michael Albinus's message of "Fri, 05 Nov 2021 19:37:04 +0100") X-Mailer: WebService/1.1.19266 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.179.148; envelope-from=mardani29@yahoo.es; helo=sonic304-23.consmr.mail.ir2.yahoo.com 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, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:278805 Archived-At: --=-=-= Content-Type: text/plain Michael Albinus writes: > > This breaks the compilation on emba, see for example > . > > Best regards, Michael. Thanks for the report. Does the attached patch solve the issue? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-GNUstep-build.patch >From 216fd1d886d3ff983ddf24ad056eab3cdbbbaa0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= Date: Fri, 5 Nov 2021 21:03:33 +0100 Subject: [PATCH] Fix GNUstep build * src/nsterm.m (ns_compute_glyph_string_overhangs): Declare the font variable so that it's in scope for the GNUstep code. --- src/nsterm.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index f3dd0d791c..54989a2373 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2849,12 +2849,13 @@ Hide the window (X11 semantics) External (RIF); compute left/right overhang of whole string and set in s -------------------------------------------------------------------------- */ { + struct font *font = s->font; + if (s->char2b) { struct font_metrics metrics; if (s->first_glyph->type == CHAR_GLYPH && !s->font_not_found_p) { - struct font *font = s->font; font->driver->text_extents (font, s->char2b, s->nchars, &metrics); s->left_overhang = -metrics.lbearing; s->right_overhang -- 2.31.0 --=-=-=--