mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 15:10:19 +01:00
Fix crash when all glyphs of a given depth are freed, but not all glyphsets
This is how the crash can be triggered with only two clients on the system: Client A: (already running) Client B: Connect Client B: CreateGlyphSet(depthN) Client A: Disconnect Server: free globalGlyphs(depthN) Client B: AddGlyphs(depthN) Server: SEGV This crash was introduced with the FindGlyphsByHash function in516b96387b. Before that revision, ResizeGlyphSet was always called before FindGlyphRef, which would re-create globalGlyphs(depthN) if necessary. X.Org Bug 20718 <http://bugs.freedesktop.org/show_bug.cgi?id=20718> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Harris <pharris@opentext.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit185185eeb4)
This commit is contained in:
parent
4c85c3815a
commit
2fa794f246
1 changed files with 3 additions and 0 deletions
|
|
@ -235,6 +235,9 @@ FindGlyphByHash (unsigned char sha1[20], int format)
|
|||
GlyphRefPtr gr;
|
||||
CARD32 signature = *(CARD32 *) sha1;
|
||||
|
||||
if (!globalGlyphs[format].hashSet)
|
||||
return NULL;
|
||||
|
||||
gr = FindGlyphRef (&globalGlyphs[format],
|
||||
signature, TRUE, sha1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue