aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:31 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:31 +0200
commit266b5554943baffafbf1d574f567283cc9792278 (patch)
tree4d56977572901049891af1d2e4e71b3fb4f0e745 /nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
parent3e7c6697ac2631a215691c8d23a32a790db33b85 (diff)
downloadnx-libs-266b5554943baffafbf1d574f567283cc9792278.tar.gz
nx-libs-266b5554943baffafbf1d574f567283cc9792278.tar.bz2
nx-libs-266b5554943baffafbf1d574f567283cc9792278.zip
Imported nxagent-3.1.0-7.tar.gznxagent/3.1.0-7
Summary: Imported nxagent-3.1.0-7.tar.gz Keywords: Imported nxagent-3.1.0-7.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
index 6dfff3776..b431796be 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/X/NXdixfonts.c
@@ -437,6 +437,13 @@ doOpenFont(ClientPtr client, OFclosurePtr c)
err = BadFontName;
goto bail;
}
+ /* check values for firstCol, lastCol, firstRow, and lastRow */
+ if (pfont->info.firstCol > pfont->info.lastCol ||
+ pfont->info.firstRow > pfont->info.lastRow ||
+ pfont->info.lastCol - pfont->info.firstCol > 255) {
+ err = AllocError;
+ goto bail;
+ }
if (!pfont->fpe)
pfont->fpe = fpe;
pfont->refcnt++;