diff options
author | Kristian Høgsberg <krh@redhat.com> | 2007-01-17 17:19:53 -0500 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2007-01-17 17:19:53 -0500 |
commit | 931b777108526dd0761f948dcd9f1603ac02efc8 (patch) | |
tree | 7db2d9c8195943d4359d76230aada49684b517e8 | |
parent | 2e4ae1b524a0149479c46f3f12a9ce2413092442 (diff) |
Add stubs for the scalable renderer callbacks.
Trying to scale a bitmap font provided by the built-in backend will
crash the X server as it calls into a NULL pointer. This patch
adds "return BadFont;" stubs to prevent the crash.
-rw-r--r-- | src/builtins/render.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/builtins/render.c b/src/builtins/render.c index 39a8f07..18389b4 100644 --- a/src/builtins/render.c +++ b/src/builtins/render.c @@ -97,9 +97,38 @@ BuiltinGetInfoBitmap (fpe, pFontInfo, entry, fileName) return ret; } +static int +BuiltinOpenScalable (FontPathElementPtr fpe, + FontPtr *pFont, + int flags, + FontEntryPtr entry, + char *fileName, + FontScalablePtr vals, + fsBitmapFormat format, + fsBitmapFormatMask fmask, + FontPtr non_cachable_font) /* We don't do licensing */ +{ + return BadFontName; +} + +static int +BuiltinGetInfoScalable (FontPathElementPtr fpe, + FontInfoPtr pFontInfo, + FontEntryPtr entry, + FontNamePtr fontName, + char *fileName, + FontScalablePtr vals) +{ + return BadFontName; +} + static FontRendererRec renderers[] = { ".builtin", 8, - BuiltinOpenBitmap, 0, BuiltinGetInfoBitmap, 0, 0 + BuiltinOpenBitmap, + BuiltinOpenScalable, + BuiltinGetInfoBitmap, + BuiltinGetInfoScalable, + 0 }; #define numRenderers (sizeof renderers / sizeof renderers[0]) |