diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2018-08-22 22:30:34 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2018-10-22 23:23:06 +0200 |
commit | e1938c189223164f3a75cf848e90ecc1d2e55d15 (patch) | |
tree | 01098708cb7f48349664b1d712c6a77af6bd008c /nx-X11/lib/src/GetFPath.c | |
parent | 3dc4595560b34242fe4705af8c93d0024eeb2c56 (diff) | |
download | nx-libs-e1938c189223164f3a75cf848e90ecc1d2e55d15.tar.gz nx-libs-e1938c189223164f3a75cf848e90ecc1d2e55d15.tar.bz2 nx-libs-e1938c189223164f3a75cf848e90ecc1d2e55d15.zip |
libNX_X11: upgrade to X.org upstream version 1.6.6
We are at X.Org libX11 upstream commit 733f64b
Fixes: ArcticaProject/nx-libs #716, #719 and #720
Diffstat (limited to 'nx-X11/lib/src/GetFPath.c')
-rw-r--r-- | nx-X11/lib/src/GetFPath.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/nx-X11/lib/src/GetFPath.c b/nx-X11/lib/src/GetFPath.c index 3d87e4f64..87d257615 100644 --- a/nx-X11/lib/src/GetFPath.c +++ b/nx-X11/lib/src/GetFPath.c @@ -69,15 +69,20 @@ char **XGetFontPath( /* * unpack into null terminated strings. */ - chend = ch + (nbytes + 1); - length = *ch; + chend = ch + nbytes; + length = *(unsigned char *)ch; for (i = 0; i < rep.nPaths; i++) { if (ch + length < chend) { flist[i] = ch+1; /* skip over length */ ch += length + 1; /* find next length ... */ - length = *ch; + length = *(unsigned char *)ch; *ch = '\0'; /* and replace with null-termination */ count++; + } else if (i == 0) { + Xfree(flist); + Xfree(ch); + flist = NULL; + break; } else flist[i] = NULL; } |