Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
c4e7705d
Commit
c4e7705d
authored
Oct 10, 2011
by
Reinhard Tartler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported nxagent-3.2.0-7.tar.gz
Summary: Imported nxagent-3.2.0-7.tar.gz Keywords: Imported nxagent-3.2.0-7.tar.gz into Git repository
parent
c9983230
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
132 additions
and
28 deletions
+132
-28
CHANGELOG
nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
+7
-0
NXglyph.c
nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c
+17
-2
NXglyph.c.NX.original
nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original
+17
-2
NXglyph.c.X.original
nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.X.original
+12
-2
NXrender.c
nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c
+14
-4
NXrender.c.NX.original
nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original
+14
-4
NXrender.c.X.original
nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.X.original
+14
-4
NXresource.c.NX.original
...11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original
+4
-4
NXresource.c~
nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c~
+0
-0
NXshm.c
nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c
+11
-2
NXshm.c.NX.original
nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original
+11
-2
NXshm.c.X.original
nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.X.original
+11
-2
No files found.
nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
View file @
c4e7705d
ChangeLog:
ChangeLog:
nxagent-3.2.0-7
- Imported patch fixing issues from X.Org security advisory, June
11th, 2008: Multiple vulnerabilities in X server extensions. CVE
IDs: CVE-2008-1377, CVE-2008-1379, CVE-2008-2360, CVE-2008-2361,
CVE-2008-2362.
nxagent-3.2.0-6
nxagent-3.2.0-6
- Fixed TR05F02063. Ignore ReparentNotify events for non-rootless
- Fixed TR05F02063. Ignore ReparentNotify events for non-rootless
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c
View file @
c4e7705d
...
@@ -69,6 +69,17 @@
...
@@ -69,6 +69,17 @@
#undef DEBUG
#undef DEBUG
#undef TEST
#undef TEST
#else
#include "picturestr.h"
#include "glyphstr.h"
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
#endif
/*
/*
...
@@ -401,8 +412,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
...
@@ -401,8 +412,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
{
{
int
size
;
int
size
;
GlyphPtr
glyph
;
GlyphPtr
glyph
;
size_t
padded_width
;
size
=
gi
->
height
*
PixmapBytePad
(
gi
->
width
,
glyphDepths
[
fdepth
]);
padded_width
=
PixmapBytePad
(
gi
->
width
,
glyphDepths
[
fdepth
]);
if
(
gi
->
height
&&
padded_width
>
(
UINT32_MAX
-
sizeof
(
GlyphRec
))
/
gi
->
height
)
return
0
;
size
=
gi
->
height
*
padded_width
;
glyph
=
(
GlyphPtr
)
xalloc
(
size
+
sizeof
(
GlyphRec
));
glyph
=
(
GlyphPtr
)
xalloc
(
size
+
sizeof
(
GlyphRec
));
if
(
!
glyph
)
if
(
!
glyph
)
return
0
;
return
0
;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.NX.original
View file @
c4e7705d
...
@@ -69,6 +69,17 @@
...
@@ -69,6 +69,17 @@
#undef DEBUG
#undef DEBUG
#undef TEST
#undef TEST
#else
#include "picturestr.h"
#include "glyphstr.h"
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
#endif
/*
/*
...
@@ -401,8 +412,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
...
@@ -401,8 +412,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
{
{
int size;
int size;
GlyphPtr glyph;
GlyphPtr glyph;
size_t padded_width;
size = gi->height * PixmapBytePad (gi->width, glyphDepths[fdepth]);
padded_width = PixmapBytePad (gi->width, glyphDepths[fdepth]);
if (gi->height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi->height)
return 0;
size = gi->height * padded_width;
glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
if (!glyph)
if (!glyph)
return 0;
return 0;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXglyph.c.X.original
View file @
c4e7705d
...
@@ -43,6 +43,12 @@
...
@@ -43,6 +43,12 @@
#include "picturestr.h"
#include "picturestr.h"
#include "glyphstr.h"
#include "glyphstr.h"
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
/*
/*
* From Knuth -- a good choice for hash/rehash values is p, p-2 where
* From Knuth -- a good choice for hash/rehash values is p, p-2 where
* p and p-2 are both prime. These tables are sized to have an extra 10%
* p and p-2 are both prime. These tables are sized to have an extra 10%
...
@@ -334,8 +340,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
...
@@ -334,8 +340,12 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth)
{
{
int size;
int size;
GlyphPtr glyph;
GlyphPtr glyph;
size_t padded_width;
size = gi->height * PixmapBytePad (gi->width, glyphDepths[fdepth]);
padded_width = PixmapBytePad (gi->width, glyphDepths[fdepth]);
if (gi->height && padded_width > (UINT32_MAX - sizeof(GlyphRec))/gi->height)
return 0;
size = gi->height * padded_width;
glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec));
if (!glyph)
if (!glyph)
return 0;
return 0;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c
View file @
c4e7705d
...
@@ -1893,6 +1893,8 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1893,6 +1893,8 @@ ProcRenderCreateCursor (ClientPtr client)
pScreen
=
pSrc
->
pDrawable
->
pScreen
;
pScreen
=
pSrc
->
pDrawable
->
pScreen
;
width
=
pSrc
->
pDrawable
->
width
;
width
=
pSrc
->
pDrawable
->
width
;
height
=
pSrc
->
pDrawable
->
height
;
height
=
pSrc
->
pDrawable
->
height
;
if
(
height
&&
width
>
UINT32_MAX
/
(
height
*
sizeof
(
CARD32
)))
return
BadAlloc
;
if
(
stuff
->
x
>
width
if
(
stuff
->
x
>
width
||
stuff
->
y
>
height
)
||
stuff
->
y
>
height
)
return
(
BadMatch
);
return
(
BadMatch
);
...
@@ -2353,6 +2355,8 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -2353,6 +2355,8 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
LEGAL_NEW_RESOURCE
(
stuff
->
pid
,
client
);
LEGAL_NEW_RESOURCE
(
stuff
->
pid
,
client
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateLinearGradientReq
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateLinearGradientReq
);
if
(
stuff
->
nStops
>
UINT32_MAX
/
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
return
BadLength
;
...
@@ -2955,18 +2959,18 @@ SProcRenderCreateSolidFill(ClientPtr client)
...
@@ -2955,18 +2959,18 @@ SProcRenderCreateSolidFill(ClientPtr client)
return
(
*
ProcRenderVector
[
stuff
->
renderReqType
])
(
client
);
return
(
*
ProcRenderVector
[
stuff
->
renderReqType
])
(
client
);
}
}
static
void
swapStops
(
void
*
stuff
,
int
n
)
static
void
swapStops
(
void
*
stuff
,
int
n
um
)
{
{
int
i
;
int
i
,
n
;
CARD32
*
stops
;
CARD32
*
stops
;
CARD16
*
colors
;
CARD16
*
colors
;
stops
=
(
CARD32
*
)(
stuff
);
stops
=
(
CARD32
*
)(
stuff
);
for
(
i
=
0
;
i
<
n
;
++
i
)
{
for
(
i
=
0
;
i
<
n
um
;
++
i
)
{
swapl
(
stops
,
n
);
swapl
(
stops
,
n
);
++
stops
;
++
stops
;
}
}
colors
=
(
CARD16
*
)(
stops
);
colors
=
(
CARD16
*
)(
stops
);
for
(
i
=
0
;
i
<
4
*
n
;
++
i
)
{
for
(
i
=
0
;
i
<
4
*
n
um
;
++
i
)
{
swaps
(
stops
,
n
);
swaps
(
stops
,
n
);
++
stops
;
++
stops
;
}
}
...
@@ -2989,6 +2993,8 @@ SProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -2989,6 +2993,8 @@ SProcRenderCreateLinearGradient (ClientPtr client)
swapl
(
&
stuff
->
nStops
,
n
);
swapl
(
&
stuff
->
nStops
,
n
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateLinearGradientReq
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateLinearGradientReq
);
if
(
stuff
->
nStops
>
UINT32_MAX
/
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
return
BadLength
;
...
@@ -3016,6 +3022,8 @@ SProcRenderCreateRadialGradient (ClientPtr client)
...
@@ -3016,6 +3022,8 @@ SProcRenderCreateRadialGradient (ClientPtr client)
swapl
(
&
stuff
->
nStops
,
n
);
swapl
(
&
stuff
->
nStops
,
n
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateRadialGradientReq
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateRadialGradientReq
);
if
(
stuff
->
nStops
>
UINT32_MAX
/
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
return
BadLength
;
...
@@ -3040,6 +3048,8 @@ SProcRenderCreateConicalGradient (ClientPtr client)
...
@@ -3040,6 +3048,8 @@ SProcRenderCreateConicalGradient (ClientPtr client)
swapl
(
&
stuff
->
nStops
,
n
);
swapl
(
&
stuff
->
nStops
,
n
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateConicalGradientReq
);
len
=
(
client
->
req_len
<<
2
)
-
sizeof
(
xRenderCreateConicalGradientReq
);
if
(
stuff
->
nStops
>
UINT32_MAX
/
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
if
(
len
!=
stuff
->
nStops
*
(
sizeof
(
xFixed
)
+
sizeof
(
xRenderColor
)))
return
BadLength
;
return
BadLength
;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.NX.original
View file @
c4e7705d
...
@@ -1893,6 +1893,8 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1893,6 +1893,8 @@ ProcRenderCreateCursor (ClientPtr client)
pScreen = pSrc->pDrawable->pScreen;
pScreen = pSrc->pDrawable->pScreen;
width = pSrc->pDrawable->width;
width = pSrc->pDrawable->width;
height = pSrc->pDrawable->height;
height = pSrc->pDrawable->height;
if (height && width > UINT32_MAX/(height*sizeof(CARD32)))
return BadAlloc;
if ( stuff->x > width
if ( stuff->x > width
|| stuff->y > height )
|| stuff->y > height )
return (BadMatch);
return (BadMatch);
...
@@ -2353,6 +2355,8 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -2353,6 +2355,8 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
LEGAL_NEW_RESOURCE(stuff->pid, client);
LEGAL_NEW_RESOURCE(stuff->pid, client);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
@@ -2955,18 +2959,18 @@ SProcRenderCreateSolidFill(ClientPtr client)
...
@@ -2955,18 +2959,18 @@ SProcRenderCreateSolidFill(ClientPtr client)
return (*ProcRenderVector[stuff->renderReqType]) (client);
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
}
static void swapStops(void *stuff, int n)
static void swapStops(void *stuff, int n
um
)
{
{
int i;
int i
, n
;
CARD32 *stops;
CARD32 *stops;
CARD16 *colors;
CARD16 *colors;
stops = (CARD32 *)(stuff);
stops = (CARD32 *)(stuff);
for (i = 0; i < n; ++i) {
for (i = 0; i < n
um
; ++i) {
swapl(stops, n);
swapl(stops, n);
++stops;
++stops;
}
}
colors = (CARD16 *)(stops);
colors = (CARD16 *)(stops);
for (i = 0; i < 4*n; ++i) {
for (i = 0; i < 4*n
um
; ++i) {
swaps(stops, n);
swaps(stops, n);
++stops;
++stops;
}
}
...
@@ -2989,6 +2993,8 @@ SProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -2989,6 +2993,8 @@ SProcRenderCreateLinearGradient (ClientPtr client)
swapl(&stuff->nStops, n);
swapl(&stuff->nStops, n);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
@@ -3016,6 +3022,8 @@ SProcRenderCreateRadialGradient (ClientPtr client)
...
@@ -3016,6 +3022,8 @@ SProcRenderCreateRadialGradient (ClientPtr client)
swapl(&stuff->nStops, n);
swapl(&stuff->nStops, n);
len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
@@ -3040,6 +3048,8 @@ SProcRenderCreateConicalGradient (ClientPtr client)
...
@@ -3040,6 +3048,8 @@ SProcRenderCreateConicalGradient (ClientPtr client)
swapl(&stuff->nStops, n);
swapl(&stuff->nStops, n);
len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXrender.c.X.original
View file @
c4e7705d
...
@@ -1505,6 +1505,8 @@ ProcRenderCreateCursor (ClientPtr client)
...
@@ -1505,6 +1505,8 @@ ProcRenderCreateCursor (ClientPtr client)
pScreen = pSrc->pDrawable->pScreen;
pScreen = pSrc->pDrawable->pScreen;
width = pSrc->pDrawable->width;
width = pSrc->pDrawable->width;
height = pSrc->pDrawable->height;
height = pSrc->pDrawable->height;
if (height && width > UINT32_MAX/(height*sizeof(CARD32)))
return BadAlloc;
if ( stuff->x > width
if ( stuff->x > width
|| stuff->y > height )
|| stuff->y > height )
return (BadMatch);
return (BadMatch);
...
@@ -1918,6 +1920,8 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -1918,6 +1920,8 @@ static int ProcRenderCreateLinearGradient (ClientPtr client)
LEGAL_NEW_RESOURCE(stuff->pid, client);
LEGAL_NEW_RESOURCE(stuff->pid, client);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
@@ -2489,18 +2493,18 @@ SProcRenderCreateSolidFill(ClientPtr client)
...
@@ -2489,18 +2493,18 @@ SProcRenderCreateSolidFill(ClientPtr client)
return (*ProcRenderVector[stuff->renderReqType]) (client);
return (*ProcRenderVector[stuff->renderReqType]) (client);
}
}
static void swapStops(void *stuff, int n)
static void swapStops(void *stuff, int n
um
)
{
{
int i;
int i
, n
;
CARD32 *stops;
CARD32 *stops;
CARD16 *colors;
CARD16 *colors;
stops = (CARD32 *)(stuff);
stops = (CARD32 *)(stuff);
for (i = 0; i < n; ++i) {
for (i = 0; i < n
um
; ++i) {
swapl(stops, n);
swapl(stops, n);
++stops;
++stops;
}
}
colors = (CARD16 *)(stops);
colors = (CARD16 *)(stops);
for (i = 0; i < 4*n; ++i) {
for (i = 0; i < 4*n
um
; ++i) {
swaps(stops, n);
swaps(stops, n);
++stops;
++stops;
}
}
...
@@ -2523,6 +2527,8 @@ SProcRenderCreateLinearGradient (ClientPtr client)
...
@@ -2523,6 +2527,8 @@ SProcRenderCreateLinearGradient (ClientPtr client)
swapl(&stuff->nStops, n);
swapl(&stuff->nStops, n);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
@@ -2550,6 +2556,8 @@ SProcRenderCreateRadialGradient (ClientPtr client)
...
@@ -2550,6 +2556,8 @@ SProcRenderCreateRadialGradient (ClientPtr client)
swapl(&stuff->nStops, n);
swapl(&stuff->nStops, n);
len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
@@ -2574,6 +2582,8 @@ SProcRenderCreateConicalGradient (ClientPtr client)
...
@@ -2574,6 +2582,8 @@ SProcRenderCreateConicalGradient (ClientPtr client)
swapl(&stuff->nStops, n);
swapl(&stuff->nStops, n);
len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq);
if (stuff->nStops > UINT32_MAX/(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
if (len != stuff->nStops*(sizeof(xFixed) + sizeof(xRenderColor)))
return BadLength;
return BadLength;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c.NX.original
View file @
c4e7705d
...
@@ -194,10 +194,6 @@ static DeleteType *DeleteFuncs = (DeleteType *)NULL;
...
@@ -194,10 +194,6 @@ static DeleteType *DeleteFuncs = (DeleteType *)NULL;
Atom * ResourceNames = NULL;
Atom * ResourceNames = NULL;
#ifdef NXAGENT_SERVER
static int nxagentResChangedFlag = 0;
#endif
void RegisterResourceName (RESTYPE type, char *name)
void RegisterResourceName (RESTYPE type, char *name)
{
{
ResourceNames[type & TypeMask] = MakeAtom(name, strlen(name), TRUE);
ResourceNames[type & TypeMask] = MakeAtom(name, strlen(name), TRUE);
...
@@ -205,6 +201,10 @@ void RegisterResourceName (RESTYPE type, char *name)
...
@@ -205,6 +201,10 @@ void RegisterResourceName (RESTYPE type, char *name)
#endif
#endif
#ifdef NXAGENT_SERVER
static int nxagentResChangedFlag = 0;
#endif
RESTYPE
RESTYPE
CreateNewResourceType(DeleteType deleteFunc)
CreateNewResourceType(DeleteType deleteFunc)
{
{
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXresource.c~
deleted
100644 → 0
View file @
c9983230
This diff is collapsed.
Click to expand it.
nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c
View file @
c4e7705d
...
@@ -967,8 +967,17 @@ ProcShmPutImage(client)
...
@@ -967,8 +967,17 @@ ProcShmPutImage(client)
return
BadValue
;
return
BadValue
;
}
}
VERIFY_SHMSIZE
(
shmdesc
,
stuff
->
offset
,
length
*
stuff
->
totalHeight
,
/*
client
);
* There's a potential integer overflow in this check:
* VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight,
* client);
* the version below ought to avoid it
*/
if
(
stuff
->
totalHeight
!=
0
&&
length
>
(
shmdesc
->
size
-
stuff
->
offset
)
/
stuff
->
totalHeight
)
{
client
->
errorValue
=
stuff
->
totalWidth
;
return
BadValue
;
}
if
(
stuff
->
srcX
>
stuff
->
totalWidth
)
if
(
stuff
->
srcX
>
stuff
->
totalWidth
)
{
{
client
->
errorValue
=
stuff
->
srcX
;
client
->
errorValue
=
stuff
->
srcX
;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.NX.original
View file @
c4e7705d
...
@@ -967,8 +967,17 @@ ProcShmPutImage(client)
...
@@ -967,8 +967,17 @@ ProcShmPutImage(client)
return BadValue;
return BadValue;
}
}
VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight,
/*
client);
* There's a potential integer overflow in this check:
* VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight,
* client);
* the version below ought to avoid it
*/
if (stuff->totalHeight != 0 &&
length > (shmdesc->size - stuff->offset)/stuff->totalHeight) {
client->errorValue = stuff->totalWidth;
return BadValue;
}
if (stuff->srcX > stuff->totalWidth)
if (stuff->srcX > stuff->totalWidth)
{
{
client->errorValue = stuff->srcX;
client->errorValue = stuff->srcX;
...
...
nx-X11/programs/Xserver/hw/nxagent/X/NXshm.c.X.original
View file @
c4e7705d
...
@@ -863,8 +863,17 @@ ProcShmPutImage(client)
...
@@ -863,8 +863,17 @@ ProcShmPutImage(client)
return BadValue;
return BadValue;
}
}
VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight,
/*
client);
* There's a potential integer overflow in this check:
* VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight,
* client);
* the version below ought to avoid it
*/
if (stuff->totalHeight != 0 &&
length > (shmdesc->size - stuff->offset)/stuff->totalHeight) {
client->errorValue = stuff->totalWidth;
return BadValue;
}
if (stuff->srcX > stuff->totalWidth)
if (stuff->srcX > stuff->totalWidth)
{
{
client->errorValue = stuff->srcX;
client->errorValue = stuff->srcX;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment