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
d6ce946f
Commit
d6ce946f
authored
Apr 07, 2006
by
Daniel Stone
Committed by
Mike DePaulo
Feb 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Coverity #844, #845, #846: Fix memory leaks.
v2: backport to nx-libs 3.6.x as a prereq for the CVE-2015-0255 fix (Mike DePaulo)
parent
c910bf7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
xkb.c
nx-X11/programs/Xserver/xkb/xkb.c
+19
-3
No files found.
nx-X11/programs/Xserver/xkb/xkb.c
View file @
d6ce946f
...
...
@@ -4794,9 +4794,20 @@ char * wire;
for
(
i
=
0
;
i
<
req
->
nProperties
;
i
++
)
{
char
*
name
,
*
val
;
name
=
_GetCountedString
(
&
wire
,
client
->
swapped
);
if
(
!
name
)
return
BadAlloc
;
val
=
_GetCountedString
(
&
wire
,
client
->
swapped
);
if
((
!
name
)
||
(
!
val
)
||
(
XkbAddGeomProperty
(
geom
,
name
,
val
)
==
NULL
))
if
(
!
val
)
{
xfree
(
name
);
return
BadAlloc
;
}
if
(
XkbAddGeomProperty
(
geom
,
name
,
val
)
==
NULL
)
{
xfree
(
name
);
xfree
(
val
);
return
BadAlloc
;
}
xfree
(
name
);
xfree
(
val
);
}
if
(
req
->
nColors
<
2
)
{
...
...
@@ -4813,15 +4824,20 @@ char * wire;
}
if
(
req
->
labelColorNdx
==
req
->
baseColorNdx
)
{
client
->
errorValue
=
_XkbErrCode3
(
0x04
,
req
->
baseColorNdx
,
req
->
labelColorNdx
);
req
->
labelColorNdx
);
return
BadMatch
;
}
for
(
i
=
0
;
i
<
req
->
nColors
;
i
++
)
{
char
*
name
;
name
=
_GetCountedString
(
&
wire
,
client
->
swapped
);
if
((
!
name
)
||
(
!
XkbAddGeomColor
(
geom
,
name
,
geom
->
num_colors
)))
if
(
!
name
)
return
BadAlloc
;
if
(
!
XkbAddGeomColor
(
geom
,
name
,
geom
->
num_colors
))
{
xfree
(
name
);
return
BadAlloc
;
}
xfree
(
name
);
}
if
(
req
->
nColors
!=
geom
->
num_colors
)
{
client
->
errorValue
=
_XkbErrCode3
(
0x05
,
req
->
nColors
,
geom
->
num_colors
);
...
...
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