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
1e3db85a
Commit
1e3db85a
authored
Jun 21, 2018
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jul 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some valgrind findings
Some of them have not been seen in the wild yet. Partly fixes ArcticaProject/nx-libs#711
parent
7a627e64
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
devices.c
nx-X11/programs/Xserver/dix/devices.c
+8
-10
NXdixfonts.c
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
+3
-5
No files found.
nx-X11/programs/Xserver/dix/devices.c
View file @
1e3db85a
...
@@ -908,7 +908,7 @@ AllModifierKeysAreUp(dev, map1, per1, map2, per2)
...
@@ -908,7 +908,7 @@ AllModifierKeysAreUp(dev, map1, per1, map2, per2)
int
int
ProcSetModifierMapping
(
ClientPtr
client
)
ProcSetModifierMapping
(
ClientPtr
client
)
{
{
xSetModifierMappingReply
rep
;
xSetModifierMappingReply
rep
=
{
0
}
;
REQUEST
(
xSetModifierMappingReq
);
REQUEST
(
xSetModifierMappingReq
);
KeyCode
*
inputMap
;
KeyCode
*
inputMap
;
int
inputMapLen
;
int
inputMapLen
;
...
@@ -1016,11 +1016,10 @@ ProcSetModifierMapping(ClientPtr client)
...
@@ -1016,11 +1016,10 @@ ProcSetModifierMapping(ClientPtr client)
int
int
ProcGetModifierMapping
(
ClientPtr
client
)
ProcGetModifierMapping
(
ClientPtr
client
)
{
{
xGetModifierMappingReply
rep
;
xGetModifierMappingReply
rep
=
{
0
}
;
register
KeyClassPtr
keyc
=
inputInfo
.
keyboard
->
key
;
register
KeyClassPtr
keyc
=
inputInfo
.
keyboard
->
key
;
REQUEST_SIZE_MATCH
(
xReq
);
REQUEST_SIZE_MATCH
(
xReq
);
memset
(
&
rep
,
0
,
sizeof
(
xGetModifierMappingReply
));
rep
.
type
=
X_Reply
;
rep
.
type
=
X_Reply
;
rep
.
numKeyPerModifier
=
keyc
->
maxKeysPerModifier
;
rep
.
numKeyPerModifier
=
keyc
->
maxKeysPerModifier
;
rep
.
sequenceNumber
=
client
->
sequence
;
rep
.
sequenceNumber
=
client
->
sequence
;
...
@@ -1082,7 +1081,7 @@ ProcSetPointerMapping(ClientPtr client)
...
@@ -1082,7 +1081,7 @@ ProcSetPointerMapping(ClientPtr client)
{
{
REQUEST
(
xSetPointerMappingReq
);
REQUEST
(
xSetPointerMappingReq
);
BYTE
*
map
;
BYTE
*
map
;
xSetPointerMappingReply
rep
;
xSetPointerMappingReply
rep
=
{
0
}
;
register
unsigned
int
i
;
register
unsigned
int
i
;
DeviceIntPtr
mouse
=
inputInfo
.
pointer
;
DeviceIntPtr
mouse
=
inputInfo
.
pointer
;
...
@@ -1119,7 +1118,7 @@ ProcSetPointerMapping(ClientPtr client)
...
@@ -1119,7 +1118,7 @@ ProcSetPointerMapping(ClientPtr client)
int
int
ProcGetKeyboardMapping
(
ClientPtr
client
)
ProcGetKeyboardMapping
(
ClientPtr
client
)
{
{
xGetKeyboardMappingReply
rep
;
xGetKeyboardMappingReply
rep
=
{
0
}
;
REQUEST
(
xGetKeyboardMappingReq
);
REQUEST
(
xGetKeyboardMappingReq
);
KeySymsPtr
curKeySyms
=
&
inputInfo
.
keyboard
->
key
->
curKeySyms
;
KeySymsPtr
curKeySyms
=
&
inputInfo
.
keyboard
->
key
->
curKeySyms
;
...
@@ -1138,7 +1137,6 @@ ProcGetKeyboardMapping(ClientPtr client)
...
@@ -1138,7 +1137,6 @@ ProcGetKeyboardMapping(ClientPtr client)
return
BadValue
;
return
BadValue
;
}
}
memset
(
&
rep
,
0
,
sizeof
(
xGetKeyboardMappingReply
));
rep
.
type
=
X_Reply
;
rep
.
type
=
X_Reply
;
rep
.
sequenceNumber
=
client
->
sequence
;
rep
.
sequenceNumber
=
client
->
sequence
;
rep
.
keySymsPerKeyCode
=
curKeySyms
->
mapWidth
;
rep
.
keySymsPerKeyCode
=
curKeySyms
->
mapWidth
;
...
@@ -1387,7 +1385,7 @@ ProcGetKeyboardControl (ClientPtr client)
...
@@ -1387,7 +1385,7 @@ ProcGetKeyboardControl (ClientPtr client)
{
{
int
i
;
int
i
;
register
KeybdCtrl
*
ctrl
=
&
inputInfo
.
keyboard
->
kbdfeed
->
ctrl
;
register
KeybdCtrl
*
ctrl
=
&
inputInfo
.
keyboard
->
kbdfeed
->
ctrl
;
xGetKeyboardControlReply
rep
;
xGetKeyboardControlReply
rep
=
{
0
}
;
REQUEST_SIZE_MATCH
(
xReq
);
REQUEST_SIZE_MATCH
(
xReq
);
rep
.
type
=
X_Reply
;
rep
.
type
=
X_Reply
;
...
@@ -1492,7 +1490,7 @@ int
...
@@ -1492,7 +1490,7 @@ int
ProcGetPointerControl
(
ClientPtr
client
)
ProcGetPointerControl
(
ClientPtr
client
)
{
{
register
PtrCtrl
*
ctrl
=
&
inputInfo
.
pointer
->
ptrfeed
->
ctrl
;
register
PtrCtrl
*
ctrl
=
&
inputInfo
.
pointer
->
ptrfeed
->
ctrl
;
xGetPointerControlReply
rep
;
xGetPointerControlReply
rep
=
{
0
}
;
REQUEST_SIZE_MATCH
(
xReq
);
REQUEST_SIZE_MATCH
(
xReq
);
rep
.
type
=
X_Reply
;
rep
.
type
=
X_Reply
;
...
@@ -1526,7 +1524,7 @@ ProcGetMotionEvents(ClientPtr client)
...
@@ -1526,7 +1524,7 @@ ProcGetMotionEvents(ClientPtr client)
{
{
WindowPtr
pWin
;
WindowPtr
pWin
;
xTimecoord
*
coords
=
(
xTimecoord
*
)
NULL
;
xTimecoord
*
coords
=
(
xTimecoord
*
)
NULL
;
xGetMotionEventsReply
rep
;
xGetMotionEventsReply
rep
=
{
0
}
;
int
i
,
count
,
xmin
,
xmax
,
ymin
,
ymax
;
int
i
,
count
,
xmin
,
xmax
,
ymin
,
ymax
;
unsigned
long
nEvents
;
unsigned
long
nEvents
;
DeviceIntPtr
mouse
=
inputInfo
.
pointer
;
DeviceIntPtr
mouse
=
inputInfo
.
pointer
;
...
@@ -1591,7 +1589,7 @@ ProcGetMotionEvents(ClientPtr client)
...
@@ -1591,7 +1589,7 @@ ProcGetMotionEvents(ClientPtr client)
int
int
ProcQueryKeymap
(
ClientPtr
client
)
ProcQueryKeymap
(
ClientPtr
client
)
{
{
xQueryKeymapReply
rep
;
xQueryKeymapReply
rep
=
{
0
}
;
int
i
;
int
i
;
CARD8
*
down
=
inputInfo
.
keyboard
->
key
->
down
;
CARD8
*
down
=
inputInfo
.
keyboard
->
key
->
down
;
...
...
nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c
View file @
1e3db85a
...
@@ -361,7 +361,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
...
@@ -361,7 +361,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
int
nnames
;
int
nnames
;
int
stringLens
;
int
stringLens
;
int
i
;
int
i
;
xListFontsReply
reply
;
xListFontsReply
reply
=
{
0
}
;
char
*
bufptr
;
char
*
bufptr
;
char
*
bufferStart
;
char
*
bufferStart
;
int
aliascount
=
0
;
int
aliascount
=
0
;
...
@@ -602,13 +602,12 @@ finish:
...
@@ -602,13 +602,12 @@ finish:
for
(
i
=
0
;
i
<
nnames
;
i
++
)
for
(
i
=
0
;
i
<
nnames
;
i
++
)
stringLens
+=
(
names
->
length
[
i
]
<=
255
)
?
names
->
length
[
i
]
:
0
;
stringLens
+=
(
names
->
length
[
i
]
<=
255
)
?
names
->
length
[
i
]
:
0
;
memset
(
&
reply
,
0
,
sizeof
(
xListFontsReply
));
reply
.
type
=
X_Reply
;
reply
.
type
=
X_Reply
;
reply
.
length
=
(
stringLens
+
nnames
+
3
)
>>
2
;
reply
.
length
=
(
stringLens
+
nnames
+
3
)
>>
2
;
reply
.
nFonts
=
nnames
;
reply
.
nFonts
=
nnames
;
reply
.
sequenceNumber
=
client
->
sequence
;
reply
.
sequenceNumber
=
client
->
sequence
;
bufptr
=
bufferStart
=
(
char
*
)
malloc
(
reply
.
length
<<
2
);
bufptr
=
bufferStart
=
(
char
*
)
calloc
(
1
,
reply
.
length
<<
2
);
if
(
!
bufptr
&&
reply
.
length
)
{
if
(
!
bufptr
&&
reply
.
length
)
{
SendErrorToClient
(
client
,
X_ListFonts
,
0
,
0
,
BadAlloc
);
SendErrorToClient
(
client
,
X_ListFonts
,
0
,
0
,
BadAlloc
);
...
@@ -744,7 +743,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
...
@@ -744,7 +743,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
xFontProp
*
pFP
;
xFontProp
*
pFP
;
int
i
;
int
i
;
int
aliascount
=
0
;
int
aliascount
=
0
;
xListFontsWithInfoReply
finalReply
;
xListFontsWithInfoReply
finalReply
=
{
0
}
;
if
(
client
->
clientGone
)
if
(
client
->
clientGone
)
{
{
...
@@ -967,7 +966,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
...
@@ -967,7 +966,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
}
}
finish:
finish:
length
=
sizeof
(
xListFontsWithInfoReply
);
length
=
sizeof
(
xListFontsWithInfoReply
);
bzero
((
char
*
)
&
finalReply
,
sizeof
(
xListFontsWithInfoReply
));
finalReply
.
type
=
X_Reply
;
finalReply
.
type
=
X_Reply
;
finalReply
.
sequenceNumber
=
client
->
sequence
;
finalReply
.
sequenceNumber
=
client
->
sequence
;
finalReply
.
length
=
(
sizeof
(
xListFontsWithInfoReply
)
finalReply
.
length
=
(
sizeof
(
xListFontsWithInfoReply
)
...
...
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