aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render/glyph.c
Commit message (Collapse)AuthorAgeFilesLines
* glyph.c: fix a read beyond end of heap bufferUlrich Sibiller2019-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If compiled with -fsanitize=address this showed up when running startlxde: ==11551==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60d000018fbc at pc 0x7f270a9ed57b bp 0x7fff30ef3050 sp 0x7fff30ef2800 READ of size 204 at 0x60d000018fbc thread T0 #0 0x7f270a9ed57a (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xb857a) #1 0x559dafcd5c93 in FindGlyphRef ../../render/glyph.c:179 #2 0x559dafcd705d in AddGlyph /work/nx-libs/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c:71 #3 0x559dafccc0ff in ProcRenderAddGlyphs ../../mi/../render/render.c:1186 #4 0x559dafcbd5a5 in ProcRenderDispatch /work/nx-libs/nx-X11/programs/Xserver/hw/nxagent/NXrender.c:1689 #5 0x559dafcbc4ea in Dispatch /work/nx-libs/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c:476 #6 0x559dafc4e9b0 in main /work/nx-libs/nx-X11/programs/Xserver/dix/main.c:353 #7 0x7f2708e1d09a in __libc_start_main ../csu/libc-start.c:308 #8 0x559dafc4f5d9 in _start (/work/nx-libs/nx-X11/programs/Xserver/nxagent+0x6e5d9) 0x60d000018fbc is located 0 bytes to the right of 140-byte region [0x60d000018f30,0x60d000018fbc) allocated by thread T0 here: #0 0x7f270aa1e330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330) #1 0x559dafcd646c in AllocateGlyph ../../render/glyph.c:348 This happens when two glyphs are compared via memcmp and the smaller one happens to be identical to the beginning of the bigger one. Newer render implementations use a sha1 hash instead of memcmp so this patch will (hopefully) be obsolete once render gets updated.
* render/glyph.c: add missing usage_hintUlrich Sibiller2019-06-111-1/+2
| | | | was missing in 8b5bb2cdafe5f7bd77826a1fd28f07b7329be899
* Clearing comments from $XFree86$ (et al.) header lines.Mike Gabriel2017-04-191-2/+0
|
* misc nx-X11/programs/Xserver/{hw/nxagent,miext,render}/: move code around so ↵Mihai Moldovan2017-03-031-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | that we can drop nx-X11/programs/Xserver/render/miglyph.c (and by extension nx-X11/programs/Xserver/hw/nxagent/NXmiglyph.c.) This is essentially a bastardized cross/backport of these X.Org commits - based on our current architecture: commit 4b14c9a9cd2033d3839c4ba364d41ab4c4b198ab Author: Eric Anholt <eric@anholt.net> Date: Fri Oct 19 16:34:54 2007 -0700 Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code. Not all of the DDX/miext Glyphs hook implementations have been removed, but they should be. and commit 2251572062b2c25643671b8d5070de1c3f7ae976 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Oct 26 15:13:50 2007 -0700 Restore the CompositeGlyphs -> ps->Glyphs -> miGlyphs callchain to allow acceleration architectures to wrap above miGlyphs. Conflicts: nx-X11/programs/Xserver/render/miglyph.c nx-X11/programs/Xserver/render/mipict.h nx-X11/programs/Xserver/render/picture.c
* nx-X11/programs/Xserver: Drop {X,x}realloc() macros, use realloc() instead.Mike Gabriel2016-07-021-1/+1
|
* nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.Mike Gabriel2016-07-021-4/+4
|
* nx-X11/programs/Xserver: Drop {X,x}free() macros, use free() instead.Mike Gabriel2016-07-021-8/+8
| | | | Fixes ArcticaProject/nx-libs#105
* hw/nxagent/NXglyph.c: Shrink file, drop duplicate code that can identically ↵Mike Gabriel2016-06-251-0/+7
| | | | be found in render/glyph.c.
* HAVE_STDINT_H: Always include <stdint.h>.Mike Gabriel2016-05-021-4/+0
| | | | | We don't define HAVE_STDINT_H anywhere and it should be more safe using the system's definition of UINT32_MAX.
* Replace 'pointer' type with 'void *'Keith Packard2015-12-281-12/+12
| | | | | | | | | | This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> Rebased against NX: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
* Imported nx-X11-3.2.0-2.tar.gznx-X11/3.2.0-2Reinhard Tartler2011-10-101-2/+12
| | | | | | | | Summary: Imported nx-X11-3.2.0-2.tar.gz Keywords: Imported nx-X11-3.2.0-2.tar.gz into Git repository
* Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1Reinhard Tartler2011-10-101-0/+478
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository