From b4d3dc5bff6a8d3b09a61dbf8421a46fd23b82e8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 20 Jun 2019 19:14:10 +0200 Subject: NXdixfonts.c: fix index out of bounds --- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 50bf719c6..bfb208593 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -1216,7 +1216,7 @@ nxdoListFontsAndAliases(client, fss) if (c->savedName) { memcpy(tmp,c->savedName,c->savedNameLen>255?255:c->savedNameLen); - tmp[c->savedNameLen>255?256:c->savedNameLen]=0; + tmp[c->savedNameLen>255?255:c->savedNameLen]=0; if (nxagentFontLookUp(tmp)) break; else tmp[0]=0; @@ -1225,7 +1225,7 @@ nxdoListFontsAndAliases(client, fss) else { memcpy(tmp,name,namelen>255?255:namelen); - tmp[namelen>255?256:namelen]=0; + tmp[namelen>255?255:namelen]=0; if (nxagentFontLookUp(tmp)) break; else tmp[0]=0; -- cgit v1.2.3