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
3d1c57d5
Commit
3d1c57d5
authored
Oct 10, 2011
by
Reinhard Tartler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
parent
844a4094
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
174 additions
and
89 deletions
+174
-89
CHANGELOG
nx-X11/CHANGELOG
+7
-0
CHANGELOG.NX.original
nx-X11/CHANGELOG.NX.original
+7
-0
pcfread.c
nx-X11/lib/font/bitmap/pcfread.c
+6
-0
EVI.c
nx-X11/programs/Xserver/Xext/EVI.c
+14
-1
cup.c
nx-X11/programs/Xserver/Xext/cup.c
+3
-0
sampleEVI.c
nx-X11/programs/Xserver/Xext/sampleEVI.c
+24
-5
security.c
nx-X11/programs/Xserver/Xext/security.c
+5
-5
security.c.NX.original
nx-X11/programs/Xserver/Xext/security.c.NX.original
+5
-5
security.c.X.original
nx-X11/programs/Xserver/Xext/security.c.X.original
+3
-3
shm.c
nx-X11/programs/Xserver/Xext/shm.c
+42
-8
chgfctl.c
nx-X11/programs/Xserver/Xi/chgfctl.c
+1
-7
chgkmap.c
nx-X11/programs/Xserver/Xi/chgkmap.c
+7
-8
chgprop.c
nx-X11/programs/Xserver/Xi/chgprop.c
+3
-8
grabdev.c
nx-X11/programs/Xserver/Xi/grabdev.c
+5
-8
grabdevb.c
nx-X11/programs/Xserver/Xi/grabdevb.c
+3
-8
grabdevk.c
nx-X11/programs/Xserver/Xi/grabdevk.c
+2
-8
selectev.c
nx-X11/programs/Xserver/Xi/selectev.c
+4
-8
sendexev.c
nx-X11/programs/Xserver/Xi/sendexev.c
+8
-7
dixfonts.c
nx-X11/programs/Xserver/dix/dixfonts.c
+7
-0
dixfonts.c.NX.original
nx-X11/programs/Xserver/dix/dixfonts.c.NX.original
+7
-0
dixfonts.c.X.original
nx-X11/programs/Xserver/dix/dixfonts.c.X.original
+7
-0
xf86MiscExt.c
nx-X11/programs/Xserver/hw/xfree86/common/xf86MiscExt.c
+4
-0
No files found.
nx-X11/CHANGELOG
View file @
3d1c57d5
ChangeLog:
nx-X11-3.1.0-4
- Imported patch fixing issues from X.Org security advisory, January
17th, 2008: Multiple vulnerabilities in the X server. CVE IDs:
CVE-2007-5760 CVE-2007-5958 CVE-2007-6427 CVE-2007-6428
CVE-2007-6429 CVE-2008-0006.
nx-X11-3.1.0-3
- Moved a variable definition placed in _mesa_make_current().
...
...
nx-X11/CHANGELOG.NX.original
View file @
3d1c57d5
ChangeLog:
nx-X11-3.1.0-4
- Imported patch fixing issues from X.Org security advisory, January
17th, 2008: Multiple vulnerabilities in the X server. CVE IDs:
CVE-2007-5760 CVE-2007-5958 CVE-2007-6427 CVE-2007-6428
CVE-2007-6429 CVE-2008-0006.
nx-X11-3.1.0-3
- Moved a variable definition placed in _mesa_make_current().
...
...
nx-X11/lib/font/bitmap/pcfread.c
View file @
3d1c57d5
...
...
@@ -565,6 +565,9 @@ pcfReadFont(FontPtr pFont, FontFilePtr file,
pFont
->
info
.
lastRow
=
pcfGetINT16
(
file
,
format
);
pFont
->
info
.
defaultCh
=
pcfGetINT16
(
file
,
format
);
if
(
IS_EOF
(
file
))
goto
Bail
;
if
(
pFont
->
info
.
firstCol
>
pFont
->
info
.
lastCol
||
pFont
->
info
.
firstRow
>
pFont
->
info
.
lastRow
||
pFont
->
info
.
lastCol
-
pFont
->
info
.
firstCol
>
255
)
goto
Bail
;
nencoding
=
(
pFont
->
info
.
lastCol
-
pFont
->
info
.
firstCol
+
1
)
*
(
pFont
->
info
.
lastRow
-
pFont
->
info
.
firstRow
+
1
);
...
...
@@ -703,6 +706,9 @@ pcfReadFontInfo(FontInfoPtr pFontInfo, FontFilePtr file)
pFontInfo
->
lastRow
=
pcfGetINT16
(
file
,
format
);
pFontInfo
->
defaultCh
=
pcfGetINT16
(
file
,
format
);
if
(
IS_EOF
(
file
))
goto
Bail
;
if
(
pFontInfo
->
firstCol
>
pFontInfo
->
lastCol
||
pFontInfo
->
firstRow
>
pFontInfo
->
lastRow
||
pFontInfo
->
lastCol
-
pFontInfo
->
firstCol
>
255
)
goto
Bail
;
nencoding
=
(
pFontInfo
->
lastCol
-
pFontInfo
->
firstCol
+
1
)
*
(
pFontInfo
->
lastRow
-
pFontInfo
->
firstRow
+
1
);
...
...
nx-X11/programs/Xserver/Xext/EVI.c
View file @
3d1c57d5
...
...
@@ -36,6 +36,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XEVIstr.h>
#include "EVIstruct.h"
#include "modinit.h"
#include "scrnintstr.h"
#if 0
static unsigned char XEVIReqCode = 0;
...
...
@@ -89,10 +90,22 @@ ProcEVIGetVisualInfo(ClientPtr client)
{
REQUEST
(
xEVIGetVisualInfoReq
);
xEVIGetVisualInfoReply
rep
;
int
n
,
n_conflict
,
n_info
,
sz_info
,
sz_conflict
;
int
i
,
n
,
n_conflict
,
n_info
,
sz_info
,
sz_conflict
;
VisualID32
*
conflict
;
unsigned
int
total_visuals
=
0
;
xExtendedVisualInfo
*
eviInfo
;
int
status
;
/*
* do this first, otherwise REQUEST_FIXED_SIZE can overflow. we assume
* here that you don't have more than 2^32 visuals over all your screens;
* this seems like a safe assumption.
*/
for
(
i
=
0
;
i
<
screenInfo
.
numScreens
;
i
++
)
total_visuals
+=
screenInfo
.
screens
[
i
]
->
numVisuals
;
if
(
stuff
->
n_visual
>
total_visuals
)
return
BadValue
;
REQUEST_FIXED_SIZE
(
xEVIGetVisualInfoReq
,
stuff
->
n_visual
*
sz_VisualID32
);
status
=
eviPriv
->
getVisualInfo
((
VisualID32
*
)
&
stuff
[
1
],
(
int
)
stuff
->
n_visual
,
&
eviInfo
,
&
n_info
,
&
conflict
,
&
n_conflict
);
...
...
nx-X11/programs/Xserver/Xext/cup.c
View file @
3d1c57d5
...
...
@@ -202,6 +202,9 @@ int ProcGetReservedColormapEntries(
REQUEST_SIZE_MATCH
(
xXcupGetReservedColormapEntriesReq
);
if
(
stuff
->
screen
>=
screenInfo
.
numScreens
)
return
BadValue
;
#ifndef HAVE_SPECIAL_DESKTOP_COLORS
citems
[
CUP_BLACK_PIXEL
].
pixel
=
screenInfo
.
screens
[
stuff
->
screen
]
->
blackPixel
;
...
...
nx-X11/programs/Xserver/Xext/sampleEVI.c
View file @
3d1c57d5
...
...
@@ -36,6 +36,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <X11/extensions/XEVIstr.h>
#include "EVIstruct.h"
#include "scrnintstr.h"
#if HAVE_STDINT_H
#include <stdint.h>
#elif !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU
#endif
static
int
sampleGetVisualInfo
(
VisualID32
*
visual
,
int
n_visual
,
...
...
@@ -44,24 +51,36 @@ static int sampleGetVisualInfo(
VisualID32
**
conflict_rn
,
int
*
n_conflict_rn
)
{
int
max_sz_evi
=
n_visual
*
sz_xExtendedVisualInfo
*
screenInfo
.
numScreens
;
unsigned
int
max_sz_evi
;
VisualID32
*
temp_conflict
;
xExtendedVisualInfo
*
evi
;
int
max_visuals
=
0
,
max_sz_conflict
,
sz_conflict
=
0
;
unsigned
int
max_visuals
=
0
,
max_sz_conflict
,
sz_conflict
=
0
;
register
int
visualI
,
scrI
,
sz_evi
=
0
,
conflictI
,
n_conflict
;
*
evi_rn
=
evi
=
(
xExtendedVisualInfo
*
)
xalloc
(
max_sz_evi
);
if
(
!*
evi_rn
)
return
BadAlloc
;
if
(
n_visual
>
UINT32_MAX
/
(
sz_xExtendedVisualInfo
*
screenInfo
.
numScreens
))
return
BadAlloc
;
max_sz_evi
=
n_visual
*
sz_xExtendedVisualInfo
*
screenInfo
.
numScreens
;
for
(
scrI
=
0
;
scrI
<
screenInfo
.
numScreens
;
scrI
++
)
{
if
(
screenInfo
.
screens
[
scrI
]
->
numVisuals
>
max_visuals
)
max_visuals
=
screenInfo
.
screens
[
scrI
]
->
numVisuals
;
}
if
(
n_visual
>
UINT32_MAX
/
(
sz_VisualID32
*
screenInfo
.
numScreens
*
max_visuals
))
return
BadAlloc
;
max_sz_conflict
=
n_visual
*
sz_VisualID32
*
screenInfo
.
numScreens
*
max_visuals
;
*
evi_rn
=
evi
=
(
xExtendedVisualInfo
*
)
xalloc
(
max_sz_evi
);
if
(
!*
evi_rn
)
return
BadAlloc
;
temp_conflict
=
(
VisualID32
*
)
xalloc
(
max_sz_conflict
);
if
(
!
temp_conflict
)
{
xfree
(
*
evi_rn
);
return
BadAlloc
;
}
for
(
scrI
=
0
;
scrI
<
screenInfo
.
numScreens
;
scrI
++
)
{
for
(
visualI
=
0
;
visualI
<
n_visual
;
visualI
++
)
{
evi
[
sz_evi
].
core_visual_id
=
visual
[
visualI
];
...
...
nx-X11/programs/Xserver/Xext/security.c
View file @
3d1c57d5
...
...
@@ -1822,11 +1822,11 @@ SecurityLoadPropertyAccessList(void)
#ifdef NXAGENT_SERVER
f
=
f
open
(
_NXGetPolicyFilePath
(
SecurityPolicyFile
),
"r"
);
f
=
F
open
(
_NXGetPolicyFilePath
(
SecurityPolicyFile
),
"r"
);
#else
f
=
f
open
(
SecurityPolicyFile
,
"r"
);
f
=
F
open
(
SecurityPolicyFile
,
"r"
);
#endif
...
...
@@ -1834,11 +1834,11 @@ SecurityLoadPropertyAccessList(void)
#ifdef NXAGENT_SERVER
f
=
f
open
((
char
*
)
__XOS2RedirRoot
(
_NXGetPolicyFilePath
(
SecurityPolicyFile
)),
"r"
);
f
=
F
open
((
char
*
)
__XOS2RedirRoot
(
_NXGetPolicyFilePath
(
SecurityPolicyFile
)),
"r"
);
#else
f
=
f
open
((
char
*
)
__XOS2RedirRoot
(
SecurityPolicyFile
),
"r"
);
f
=
F
open
((
char
*
)
__XOS2RedirRoot
(
SecurityPolicyFile
),
"r"
);
#endif
...
...
@@ -1960,7 +1960,7 @@ SecurityLoadPropertyAccessList(void)
}
#endif
/* PROPDEBUG */
f
close
(
f
);
F
close
(
f
);
}
/* SecurityLoadPropertyAccessList */
...
...
nx-X11/programs/Xserver/Xext/security.c.NX.original
View file @
3d1c57d5
...
...
@@ -1822,11 +1822,11 @@ SecurityLoadPropertyAccessList(void)
#ifdef NXAGENT_SERVER
f =
f
open(_NXGetPolicyFilePath(SecurityPolicyFile), "r");
f =
F
open(_NXGetPolicyFilePath(SecurityPolicyFile), "r");
#else
f =
f
open(SecurityPolicyFile, "r");
f =
F
open(SecurityPolicyFile, "r");
#endif
...
...
@@ -1834,11 +1834,11 @@ SecurityLoadPropertyAccessList(void)
#ifdef NXAGENT_SERVER
f =
f
open((char*)__XOS2RedirRoot( _NXGetPolicyFilePath(SecurityPolicyFile)), "r");
f =
F
open((char*)__XOS2RedirRoot( _NXGetPolicyFilePath(SecurityPolicyFile)), "r");
#else
f =
f
open((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
f =
F
open((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
#endif
...
...
@@ -1960,7 +1960,7 @@ SecurityLoadPropertyAccessList(void)
}
#endif /* PROPDEBUG */
f
close(f);
F
close(f);
} /* SecurityLoadPropertyAccessList */
...
...
nx-X11/programs/Xserver/Xext/security.c.X.original
View file @
3d1c57d5
...
...
@@ -1647,9 +1647,9 @@ SecurityLoadPropertyAccessList(void)
return;
#ifndef __UNIXOS2__
f =
f
open(SecurityPolicyFile, "r");
f =
F
open(SecurityPolicyFile, "r");
#else
f =
f
open((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
f =
F
open((char*)__XOS2RedirRoot(SecurityPolicyFile), "r");
#endif
if (!f)
{
...
...
@@ -1733,7 +1733,7 @@ SecurityLoadPropertyAccessList(void)
}
#endif /* PROPDEBUG */
f
close(f);
F
close(f);
} /* SecurityLoadPropertyAccessList */
...
...
nx-X11/programs/Xserver/Xext/shm.c
View file @
3d1c57d5
...
...
@@ -728,6 +728,8 @@ ProcPanoramiXShmCreatePixmap(
int
i
,
j
,
result
;
ShmDescPtr
shmdesc
;
REQUEST
(
xShmCreatePixmapReq
);
unsigned
int
width
,
height
,
depth
;
unsigned
long
size
;
PanoramiXRes
*
newPix
;
REQUEST_SIZE_MATCH
(
xShmCreatePixmapReq
);
...
...
@@ -737,11 +739,18 @@ ProcPanoramiXShmCreatePixmap(
LEGAL_NEW_RESOURCE
(
stuff
->
pid
,
client
);
VERIFY_GEOMETRABLE
(
pDraw
,
stuff
->
drawable
,
client
);
VERIFY_SHMPTR
(
stuff
->
shmseg
,
stuff
->
offset
,
TRUE
,
shmdesc
,
client
);
if
(
!
stuff
->
width
||
!
stuff
->
height
)
width
=
stuff
->
width
;
height
=
stuff
->
height
;
depth
=
stuff
->
depth
;
if
(
!
width
||
!
height
||
!
depth
)
{
client
->
errorValue
=
0
;
return
BadValue
;
}
if
(
width
>
32767
||
height
>
32767
)
return
BadAlloc
;
if
(
stuff
->
depth
!=
1
)
{
pDepth
=
pDraw
->
pScreen
->
allowedDepths
;
...
...
@@ -751,10 +760,18 @@ ProcPanoramiXShmCreatePixmap(
client
->
errorValue
=
stuff
->
depth
;
return
BadValue
;
}
CreatePmap
:
VERIFY_SHMSIZE
(
shmdesc
,
stuff
->
offset
,
PixmapBytePad
(
stuff
->
width
,
stuff
->
depth
)
*
stuff
->
height
,
client
);
size
=
PixmapBytePad
(
width
,
depth
)
*
height
;
if
(
sizeof
(
size
)
==
4
&&
BitsPerPixel
(
depth
)
>
8
)
{
if
(
size
<
width
*
height
)
return
BadAlloc
;
/* thankfully, offset is unsigned */
if
(
stuff
->
offset
+
size
<
size
)
return
BadAlloc
;
}
VERIFY_SHMSIZE
(
shmdesc
,
stuff
->
offset
,
size
,
client
);
if
(
!
(
newPix
=
(
PanoramiXRes
*
)
xalloc
(
sizeof
(
PanoramiXRes
))))
return
BadAlloc
;
...
...
@@ -1052,6 +1069,8 @@ ProcShmCreatePixmap(client)
register
int
i
;
ShmDescPtr
shmdesc
;
REQUEST
(
xShmCreatePixmapReq
);
unsigned
int
width
,
height
,
depth
;
unsigned
long
size
;
REQUEST_SIZE_MATCH
(
xShmCreatePixmapReq
);
client
->
errorValue
=
stuff
->
pid
;
...
...
@@ -1060,11 +1079,18 @@ ProcShmCreatePixmap(client)
LEGAL_NEW_RESOURCE
(
stuff
->
pid
,
client
);
VERIFY_GEOMETRABLE
(
pDraw
,
stuff
->
drawable
,
client
);
VERIFY_SHMPTR
(
stuff
->
shmseg
,
stuff
->
offset
,
TRUE
,
shmdesc
,
client
);
if
(
!
stuff
->
width
||
!
stuff
->
height
)
width
=
stuff
->
width
;
height
=
stuff
->
height
;
depth
=
stuff
->
depth
;
if
(
!
width
||
!
height
||
!
depth
)
{
client
->
errorValue
=
0
;
return
BadValue
;
}
if
(
width
>
32767
||
height
>
32767
)
return
BadAlloc
;
if
(
stuff
->
depth
!=
1
)
{
pDepth
=
pDraw
->
pScreen
->
allowedDepths
;
...
...
@@ -1074,10 +1100,18 @@ ProcShmCreatePixmap(client)
client
->
errorValue
=
stuff
->
depth
;
return
BadValue
;
}
CreatePmap
:
VERIFY_SHMSIZE
(
shmdesc
,
stuff
->
offset
,
PixmapBytePad
(
stuff
->
width
,
stuff
->
depth
)
*
stuff
->
height
,
client
);
size
=
PixmapBytePad
(
width
,
depth
)
*
height
;
if
(
sizeof
(
size
)
==
4
&&
BitsPerPixel
(
depth
)
>
8
)
{
if
(
size
<
width
*
height
)
return
BadAlloc
;
/* thankfully, offset is unsigned */
if
(
stuff
->
offset
+
size
<
size
)
return
BadAlloc
;
}
VERIFY_SHMSIZE
(
shmdesc
,
stuff
->
offset
,
size
,
client
);
pMap
=
(
*
shmFuncs
[
pDraw
->
pScreen
->
myNum
]
->
CreatePixmap
)(
pDraw
->
pScreen
,
stuff
->
width
,
stuff
->
height
,
stuff
->
depth
,
...
...
nx-X11/programs/Xserver/Xi/chgfctl.c
View file @
3d1c57d5
...
...
@@ -506,7 +506,6 @@ ChangeStringFeedback (client, dev, mask, s, f)
xStringFeedbackCtl
*
f
;
{
register
char
n
;
register
long
*
p
;
int
i
,
j
;
KeySym
*
syms
,
*
sup_syms
;
...
...
@@ -514,12 +513,7 @@ ChangeStringFeedback (client, dev, mask, s, f)
if
(
client
->
swapped
)
{
swaps
(
&
f
->
length
,
n
);
/* swapped num_keysyms in calling proc */
p
=
(
long
*
)
(
syms
);
for
(
i
=
0
;
i
<
f
->
num_keysyms
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
SwapLongs
((
CARD32
*
)
syms
,
f
->
num_keysyms
);
}
if
(
f
->
num_keysyms
>
s
->
ctrl
.
max_symbols
)
...
...
nx-X11/programs/Xserver/Xi/chgkmap.c
View file @
3d1c57d5
...
...
@@ -83,19 +83,14 @@ SProcXChangeDeviceKeyMapping(client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
register
int
i
,
count
;
unsigned
int
count
;
REQUEST
(
xChangeDeviceKeyMappingReq
);
swaps
(
&
stuff
->
length
,
n
);
REQUEST_AT_LEAST_SIZE
(
xChangeDeviceKeyMappingReq
);
p
=
(
long
*
)
&
stuff
[
1
];
count
=
stuff
->
keyCodes
*
stuff
->
keySymsPerKeyCode
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
REQUEST_FIXED_SIZE
(
xChangeDeviceKeyMappingReq
,
count
*
sizeof
(
CARD32
));
SwapLongs
((
CARD32
*
)
(
&
stuff
[
1
]),
count
);
return
(
ProcXChangeDeviceKeyMapping
(
client
));
}
...
...
@@ -112,10 +107,14 @@ ProcXChangeDeviceKeyMapping(client)
int
ret
;
unsigned
len
;
DeviceIntPtr
dev
;
unsigned
int
count
;
REQUEST
(
xChangeDeviceKeyMappingReq
);
REQUEST_AT_LEAST_SIZE
(
xChangeDeviceKeyMappingReq
);
count
=
stuff
->
keyCodes
*
stuff
->
keySymsPerKeyCode
;
REQUEST_FIXED_SIZE
(
xChangeDeviceKeyMappingReq
,
count
*
sizeof
(
CARD32
));
dev
=
LookupDeviceIntRec
(
stuff
->
deviceid
);
if
(
dev
==
NULL
)
{
...
...
nx-X11/programs/Xserver/Xi/chgprop.c
View file @
3d1c57d5
...
...
@@ -85,20 +85,15 @@ SProcXChangeDeviceDontPropagateList(client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
register
int
i
;
REQUEST
(
xChangeDeviceDontPropagateListReq
);
swaps
(
&
stuff
->
length
,
n
);
REQUEST_AT_LEAST_SIZE
(
xChangeDeviceDontPropagateListReq
);
swapl
(
&
stuff
->
window
,
n
);
swaps
(
&
stuff
->
count
,
n
);
p
=
(
long
*
)
&
stuff
[
1
];
for
(
i
=
0
;
i
<
stuff
->
count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
REQUEST_FIXED_SIZE
(
xChangeDeviceDontPropagateListReq
,
stuff
->
count
*
sizeof
(
CARD32
));
SwapLongs
((
CARD32
*
)
(
&
stuff
[
1
]),
stuff
->
count
);
return
(
ProcXChangeDeviceDontPropagateList
(
client
));
}
...
...
nx-X11/programs/Xserver/Xi/grabdev.c
View file @
3d1c57d5
...
...
@@ -87,8 +87,6 @@ SProcXGrabDevice(client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
register
int
i
;
REQUEST
(
xGrabDeviceReq
);
swaps
(
&
stuff
->
length
,
n
);
...
...
@@ -96,12 +94,11 @@ SProcXGrabDevice(client)
swapl
(
&
stuff
->
grabWindow
,
n
);
swapl
(
&
stuff
->
time
,
n
);
swaps
(
&
stuff
->
event_count
,
n
);
p
=
(
long
*
)
&
stuff
[
1
];
for
(
i
=
0
;
i
<
stuff
->
event_count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
if
(
stuff
->
length
!=
(
sizeof
(
xGrabDeviceReq
)
>>
2
)
+
stuff
->
event_count
)
return
BadLength
;
SwapLongs
((
CARD32
*
)
(
&
stuff
[
1
]),
stuff
->
event_count
);
return
(
ProcXGrabDevice
(
client
));
}
...
...
nx-X11/programs/Xserver/Xi/grabdevb.c
View file @
3d1c57d5
...
...
@@ -84,8 +84,6 @@ SProcXGrabDeviceButton(client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
register
int
i
;
REQUEST
(
xGrabDeviceButtonReq
);
swaps
(
&
stuff
->
length
,
n
);
...
...
@@ -93,12 +91,9 @@ SProcXGrabDeviceButton(client)
swapl
(
&
stuff
->
grabWindow
,
n
);
swaps
(
&
stuff
->
modifiers
,
n
);
swaps
(
&
stuff
->
event_count
,
n
);
p
=
(
long
*
)
&
stuff
[
1
];
for
(
i
=
0
;
i
<
stuff
->
event_count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
REQUEST_FIXED_SIZE
(
xGrabDeviceButtonReq
,
stuff
->
event_count
*
sizeof
(
CARD32
));
SwapLongs
((
CARD32
*
)
(
&
stuff
[
1
]),
stuff
->
event_count
);
return
(
ProcXGrabDeviceButton
(
client
));
}
...
...
nx-X11/programs/Xserver/Xi/grabdevk.c
View file @
3d1c57d5
...
...
@@ -84,8 +84,6 @@ SProcXGrabDeviceKey(client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
register
int
i
;
REQUEST
(
xGrabDeviceKeyReq
);
swaps
(
&
stuff
->
length
,
n
);
...
...
@@ -93,12 +91,8 @@ SProcXGrabDeviceKey(client)
swapl
(
&
stuff
->
grabWindow
,
n
);
swaps
(
&
stuff
->
modifiers
,
n
);
swaps
(
&
stuff
->
event_count
,
n
);
p
=
(
long
*
)
&
stuff
[
1
];
for
(
i
=
0
;
i
<
stuff
->
event_count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
REQUEST_FIXED_SIZE
(
xGrabDeviceKeyReq
,
stuff
->
event_count
*
sizeof
(
CARD32
));
SwapLongs
((
CARD32
*
)
(
&
stuff
[
1
]),
stuff
->
event_count
);
return
(
ProcXGrabDeviceKey
(
client
));
}
...
...
nx-X11/programs/Xserver/Xi/selectev.c
View file @
3d1c57d5
...
...
@@ -88,20 +88,16 @@ SProcXSelectExtensionEvent (client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
register
int
i
;
REQUEST
(
xSelectExtensionEventReq
);
swaps
(
&
stuff
->
length
,
n
);
REQUEST_AT_LEAST_SIZE
(
xSelectExtensionEventReq
);
swapl
(
&
stuff
->
window
,
n
);
swaps
(
&
stuff
->
count
,
n
);
p
=
(
long
*
)
&
stuff
[
1
];
for
(
i
=
0
;
i
<
stuff
->
count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
REQUEST_FIXED_SIZE
(
xSelectExtensionEventReq
,
stuff
->
count
*
sizeof
(
CARD32
));
SwapLongs
((
CARD32
*
)
(
&
stuff
[
1
]),
stuff
->
count
);
return
(
ProcXSelectExtensionEvent
(
client
));
}
...
...
nx-X11/programs/Xserver/Xi/sendexev.c
View file @
3d1c57d5
...
...
@@ -87,7 +87,7 @@ SProcXSendExtensionEvent(client)
register
ClientPtr
client
;
{
register
char
n
;
register
long
*
p
;
CARD32
*
p
;
register
int
i
;
xEvent
eventT
;
xEvent
*
eventP
;
...
...
@@ -98,6 +98,11 @@ SProcXSendExtensionEvent(client)
REQUEST_AT_LEAST_SIZE
(
xSendExtensionEventReq
);
swapl
(
&
stuff
->
destination
,
n
);
swaps
(
&
stuff
->
count
,
n
);
if
(
stuff
->
length
!=
(
sizeof
(
xSendExtensionEventReq
)
>>
2
)
+
stuff
->
count
+
(
stuff
->
num_events
*
(
sizeof
(
xEvent
)
>>
2
)))
return
BadLength
;
eventP
=
(
xEvent
*
)
&
stuff
[
1
];
for
(
i
=
0
;
i
<
stuff
->
num_events
;
i
++
,
eventP
++
)
{
...
...
@@ -108,12 +113,8 @@ SProcXSendExtensionEvent(client)
*
eventP
=
eventT
;
}
p
=
(
long
*
)
(((
xEvent
*
)
&
stuff
[
1
])
+
stuff
->
num_events
);
for
(
i
=
0
;
i
<
stuff
->
count
;
i
++
)
{
swapl
(
p
,
n
);
p
++
;
}
p
=
(
CARD32
*
)(((
xEvent
*
)
&
stuff
[
1
])
+
stuff
->
num_events
);
SwapLongs
(
p
,
stuff
->
count
);
return
(
ProcXSendExtensionEvent
(
client
));
}
...
...
nx-X11/programs/Xserver/dix/dixfonts.c
View file @
3d1c57d5
...
...
@@ -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
++
;
...
...
nx-X11/programs/Xserver/dix/dixfonts.c.NX.original
View file @
3d1c57d5
...
...
@@ -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++;
...
...
nx-X11/programs/Xserver/dix/dixfonts.c.X.original
View file @
3d1c57d5
...
...
@@ -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++;
...
...
nx-X11/programs/Xserver/hw/xfree86/common/xf86MiscExt.c
View file @
3d1c57d5
...
...
@@ -647,6 +647,10 @@ MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval,
DEBUG_P
(
"MiscExtPassMessage"
);
/* should check this in the protocol, but xf86NumScreens isn't exported */
if
(
scrnIndex
>=
xf86NumScreens
)
return
BadValue
;
if
(
*
pScr
->
HandleMessage
==
NULL
)
return
BadImplementation
;
return
(
*
pScr
->
HandleMessage
)(
scrnIndex
,
msgtype
,
msgval
,
retstr
);
...
...
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