all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Daniel Martín" <mardani29@yahoo.es>
To: Michael Albinus <michael.albinus@gmx.de>
Cc: emacs-devel@gnu.org
Subject: Re: master 48af19c: Fix buffer overflow in ns_compute_glyph_string_overhangs
Date: Fri, 05 Nov 2021 21:11:48 +0100	[thread overview]
Message-ID: <m1v916gy63.fsf@yahoo.es> (raw)
In-Reply-To: <8735oae9f3.fsf@gmx.de> (Michael Albinus's message of "Fri, 05 Nov 2021 19:37:04 +0100")

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

Michael Albinus <michael.albinus@gmx.de> writes:

>
> This breaks the compilation on emba, see for example
> <https://emba.gnu.org/emacs/emacs/-/jobs/31765/raw>.
>
> Best regards, Michael.

Thanks for the report.  Does the attached patch solve the issue?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-GNUstep-build.patch --]
[-- Type: text/x-patch, Size: 1121 bytes --]

From 216fd1d886d3ff983ddf24ad056eab3cdbbbaa0e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Mart=C3=ADn?= <mardani29@yahoo.es>
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


  reply	other threads:[~2021-11-05 20:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211105023922.4023.62369@vcs0.savannah.gnu.org>
     [not found] ` <20211105023924.2CEBA209C7@vcs0.savannah.gnu.org>
2021-11-05 18:37   ` master 48af19c: Fix buffer overflow in ns_compute_glyph_string_overhangs Michael Albinus
2021-11-05 20:11     ` Daniel Martín [this message]
2021-11-05 22:24       ` Lars Ingebrigtsen
2021-11-06 10:43         ` Michael Albinus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1v916gy63.fsf@yahoo.es \
    --to=mardani29@yahoo.es \
    --cc=emacs-devel@gnu.org \
    --cc=michael.albinus@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.