diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-11-04 13:03:31 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-11-04 13:03:31 +0100 |
commit | 6cd4f12322ffccdbbfa10ce9e282e54a932b995c (patch) | |
tree | 14c7f66f02ffdc714ae403bd178859f3cae54666 | |
parent | ced973e36f67f78cef720d0fc54e47bb8e5b22a6 (diff) | |
parent | 7da2ee0bd3010a8123838ebfd681169d2636c650 (diff) | |
download | nx-libs-6cd4f12322ffccdbbfa10ce9e282e54a932b995c.tar.gz nx-libs-6cd4f12322ffccdbbfa10ce9e282e54a932b995c.tar.bz2 nx-libs-6cd4f12322ffccdbbfa10ce9e282e54a932b995c.zip |
Merge branch 'sunweaver-pr/default-to-NXAGENT_DANGEROUS_XFONT_LOOP_EXIT' into 3.6.x
Attributes GH PR #961: https://github.com/ArcticaProject/nx-libs/pull/961
Approved by Ulrich Sibiller <uli42@gmx.de>, Tue, 03 Nov 2020 08:14:04 -0800
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 15 |
1 files changed, 11 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..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]; @@ -1199,7 +1206,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 +1221,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 +1236,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 +1334,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) |