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
730876f8
Commit
730876f8
authored
May 31, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXrender.c, render.c: fix memory handling bugs
parent
60e0566d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
NXrender.c
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
+15
-0
render.c
nx-X11/programs/Xserver/render/render.c
+7
-3
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXrender.c
View file @
730876f8
...
...
@@ -1001,6 +1001,7 @@ ProcRenderCompositeGlyphs (ClientPtr client)
listsBase
=
(
GlyphListPtr
)
malloc
(
nlist
*
sizeof
(
GlyphListRec
));
if
(
!
listsBase
)
{
if
(
glyphsBase
!=
glyphsLocal
)
free
(
glyphsBase
);
return
BadAlloc
;
}
...
...
@@ -1009,7 +1010,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
elementsBase
=
malloc
(
nlist
*
sizeof
(
XGlyphElt8
));
if
(
!
elementsBase
)
{
if
(
glyphsBase
!=
glyphsLocal
)
free
(
glyphsBase
);
if
(
listsBase
!=
listsLocal
)
free
(
listsBase
);
return
BadAlloc
;
}
...
...
@@ -1044,6 +1047,9 @@ ProcRenderCompositeGlyphs (ClientPtr client)
free
(
glyphsBase
);
if
(
listsBase
!=
listsLocal
)
free
(
listsBase
);
#ifdef NXAGENT_SERVER
free
(
elementsBase
);
#endif
return
RenderErrBase
+
BadGlyphSet
;
}
}
...
...
@@ -1101,7 +1107,16 @@ ProcRenderCompositeGlyphs (ClientPtr client)
}
}
if
(
buffer
>
end
)
{
if
(
glyphsBase
!=
glyphsLocal
)
free
(
glyphsBase
);
if
(
listsBase
!=
listsLocal
)
free
(
listsBase
);
#ifdef NXAGENT_SERVER
free
(
elementsBase
);
#endif
return
BadLength
;
}
/*
* We need to know the glyphs extents to synchronize
...
...
nx-X11/programs/Xserver/render/render.c
View file @
730876f8
...
...
@@ -1347,9 +1347,8 @@ ProcRenderCompositeGlyphs (ClientPtr client)
listsBase
=
(
GlyphListPtr
)
malloc
(
nlist
*
sizeof
(
GlyphListRec
));
if
(
!
listsBase
)
{
if
(
glyphsBase
!=
glyphsLocal
)
free
(
glyphsBase
);
free
(
listsBase
);
return
BadAlloc
;
}
}
...
...
@@ -1417,8 +1416,13 @@ ProcRenderCompositeGlyphs (ClientPtr client)
}
}
if
(
buffer
>
end
)
{
if
(
glyphsBase
!=
glyphsLocal
)
free
(
glyphsBase
);
if
(
listsBase
!=
listsLocal
)
free
(
listsBase
);
return
BadLength
;
}
CompositeGlyphs
(
stuff
->
op
,
pSrc
,
pDst
,
...
...
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