From 091ccad45e9da6e00bfbb41fdd160b86084fc2fe Mon Sep 17 00:00:00 2001 From: kramm Date: Sun, 16 Apr 2006 13:36:37 +0000 Subject: [PATCH] added some consistency checking for id table --- lib/modules/swfrender.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/modules/swfrender.c b/lib/modules/swfrender.c index 994ac29..64dc696 100644 --- a/lib/modules/swfrender.c +++ b/lib/modules/swfrender.c @@ -1012,7 +1012,10 @@ static void textcallback(void*self, int*chars, int*xpos, int nr, int fontid, int textcallbackblock_t * info = (textcallbackblock_t*)self; font_t*font = 0; int t; - if(!info->idtable[fontid].obj.font) { + if(info->idtable[fontid].type != font_type) { + fprintf(stderr, "ID %d is not a font\n", fontid); + return; + } else if(!info->idtable[fontid].obj.font) { fprintf(stderr, "Font %d unknown\n", fontid); return; } else { -- 1.7.10.4