From 3d1c57d5ef429e51ab7a626540c30b81e74a8f17 Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Mon, 10 Oct 2011 17:46:43 +0200 Subject: Imported nx-X11-3.1.0-4.tar.gz Summary: Imported nx-X11-3.1.0-4.tar.gz Keywords: Imported nx-X11-3.1.0-4.tar.gz into Git repository --- nx-X11/programs/Xserver/dix/dixfonts.c | 7 +++++++ nx-X11/programs/Xserver/dix/dixfonts.c.NX.original | 7 +++++++ nx-X11/programs/Xserver/dix/dixfonts.c.X.original | 7 +++++++ 3 files changed, 21 insertions(+) (limited to 'nx-X11/programs/Xserver/dix') diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index e62f61432..b66fe23bd 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -393,6 +393,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++; diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c.NX.original b/nx-X11/programs/Xserver/dix/dixfonts.c.NX.original index e62f61432..b66fe23bd 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c.NX.original +++ b/nx-X11/programs/Xserver/dix/dixfonts.c.NX.original @@ -393,6 +393,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++; diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c.X.original b/nx-X11/programs/Xserver/dix/dixfonts.c.X.original index 9de998417..2c5874e8d 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c.X.original +++ b/nx-X11/programs/Xserver/dix/dixfonts.c.X.original @@ -336,6 +336,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++; -- cgit v1.2.3