$NetBSD: patch-ac,v 1.1 2010/05/17 20:21:38 tez Exp $
CVE-2010-0829

--- set.c	2008-06-11 23:05:01 +0000
+++ set.c	2010-04-27 09:34:06 +0000
@@ -203,23 +203,13 @@
   }
 }
 
-dviunits SetGlyph(int32_t c, int32_t hh,int32_t vv)
+dviunits SetGlyph(struct char_entry *ptr, int32_t hh,int32_t vv)
 /* gdImageChar can only do monochrome glyphs */
 {
-  register struct char_entry *ptr;
   int dst_alpha,dst_weight,tot_weight,alpha;
   int x,y,pos=0;
   int bgColor,pixelgrey,pixelcolor;
 
-  if (c<0 || c>LASTFNTCHAR) {
-    Warning("glyph index too large (%d), skipping",c);
-    return(0);
-  }
-  ptr=currentfont->chr[c];
-  if (ptr==NULL) {
-    Warning("unable to draw glyph %d, skipping",c);
-    return(0);
-  }
   hh -= ptr->xOffset/shrinkfactor;
   vv -= ptr->yOffset/shrinkfactor;
   /* Initialize persistent color cache. Perhaps this should be in

