From fbde6d285a2712892ed05f5b9bd9a2987d64d009 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 3 Nov 2020 17:05:28 +0100 Subject: NXdixfonts.c: Rename BREAK_XFONT_LOOP to NXAGENT_DANGEROUS_XFONT_LOOP_EXIT (better macro name). --- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 516b7eb02..8ec4145f0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -1199,7 +1199,7 @@ nxdoListFontsAndAliases(ClientPtr client, nxFsPtr fss) if (err == Successful) { -#ifndef BREAK_XFONT_LOOP +#ifndef NXAGENT_DANGEROUS_XFONT_LOOP_EXIT if (tmp[0] != 0) { continue; @@ -1214,7 +1214,7 @@ nxdoListFontsAndAliases(ClientPtr client, nxFsPtr fss) tmp[c->savedNameLen >255 ? 255 : c->savedNameLen] = 0; if (nxagentFontLookUp(tmp)) { -#ifdef BREAK_XFONT_LOOP +#ifdef NXAGENT_DANGEROUS_XFONT_LOOP_EXIT break; #else continue; @@ -1229,7 +1229,7 @@ nxdoListFontsAndAliases(ClientPtr client, nxFsPtr fss) tmp[namelen > 255 ? 255 : namelen] = 0; if (nxagentFontLookUp(tmp)) { -#ifdef BREAK_XFONT_LOOP +#ifdef NXAGENT_DANGEROUS_XFONT_LOOP_EXIT break; #else continue; @@ -1327,7 +1327,7 @@ nxdoListFontsAndAliases(ClientPtr client, nxFsPtr fss) bail: finish: -#ifdef BREAK_XFONT_LOOP +#ifdef NXAGENT_DANGEROUS_XFONT_LOOP_EXIT /* if we allow above loop to be exited via break we need to free the private xfont data somehow. */ if (c->current.list_started) -- cgit v1.2.3 From 7da2ee0bd3010a8123838ebfd681169d2636c650 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 3 Nov 2020 17:05:52 +0100 Subject: NXdixfonts.c: Hard-code the enablement of NXAGENT_DANGEROUS_XFONT_LOOP_EXIT. --- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 8ec4145f0..547dac3f4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -91,6 +91,13 @@ static Bool doListFontsAndAliases(ClientPtr client, LFclosurePtr c); #undef TEST #undef DEBUG +/* This enables code that contains copies of code from libXfont. + * We copy+pasted the private _LFWIData type struct into this + * file. If this gets ever changed in libXfont, we must follow-up + * on that change here, too. + */ +#define NXAGENT_DANGEROUS_XFONT_LOOP_EXIT + #define NXFONTPATHLENGTH 1024 char _NXFontPath[NXFONTPATHLENGTH]; -- cgit v1.2.3