01_fix_fontcache_nullderef.dpatch 692 B

123456789101112131415161718192021222324
  1. #! /bin/sh /usr/share/dpatch/dpatch-run
  2. ## 01_fix_fontcache_nullderef.dpatch by A Mennucc <mennucc1@debian.org>.
  3. ##
  4. ## All lines beginning with `## DP:' are a description of the patch.
  5. ## DP: Fixes NULL dereference in gdkglfont-x11.c.
  6. @DPATCH@
  7. --- gtkglext-1.0.6/gdk/x11/gdkglfont-x11.c 2004-02-20 10:56:23.000000000 +0100
  8. +++ gtkglext-1.0.6.mine/gdk/x11/gdkglfont-x11.c 2006-05-12 11:40:11.416117472 +0200
  9. @@ -111,6 +111,12 @@
  10. fs = pango_x_font_cache_load (font_cache, xlfd);
  11. + if( fs == NULL) {
  12. + g_warning ("cannot get X font cache");
  13. + font = NULL;
  14. + goto FAIL;
  15. + }
  16. +
  17. glXUseXFont (fs->fid, first, count, list_base);
  18. pango_x_font_cache_unload (font_cache, fs);