[PATCH:libXfont 3/3] fs_send_open_font needs to allow namelen of 0 when FontReopen is set
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Apr 25 14:20:03 PDT 2014
When _fs_load_glyphs calls fs_send_open_font with FontReopen set, it
passes a NULL name and namelen of 0, since fs_send_open_font is going
to reuse the previous name.
This overly restrictive check was added in XFree86 4.3.99.12:
http://cvsweb.xfree86.org/cvsweb/xc/lib/font/fc/fserve.c.diff?r1=3.23&r2=3.24
http://cvsweb.xfree86.org/cvsweb/xc/lib/font/fc/fserve.c?rev=3.24&content-type=text/vnd.viewcvs-markup
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
src/fc/fserve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fc/fserve.c b/src/fc/fserve.c
index 3ca3912..3585951 100644
--- a/src/fc/fserve.c
+++ b/src/fc/fserve.c
@@ -1533,7 +1533,7 @@ fs_send_open_font(pointer client, FontPathElementPtr fpe, Mask flags,
if (conn->blockState & FS_GIVE_UP)
return BadFontName;
- if (namelen <= 0 || namelen > sizeof (buf) - 1)
+ if (namelen < 0 || namelen > sizeof (buf) - 1)
return BadFontName;
/*
--
1.7.9.2
More information about the xorg-devel
mailing list