+2006-02-06 Dirk Mueller <dmueller@suse.de>
+ reviewed by: plam
+
+ * src/fcfs.c (FcFontSetUnserialize):
+
+ Explain apples/oranges comparison and fix compilation error.
+
2006-02-06 Dirk Mueller <dmueller@suse.de>
reviewed by: plam
nfont = *(int *)block_ptr;
block_ptr = (int *)block_ptr + 1;
- if (nfont > 0 && nfont < metadata.count)
+ /* comparing nfont and metadata.count is a bit like comparing
+ apples and oranges. Its just for rejecting totally insane
+ nfont values, and for that its good enough */
+ if (nfont > 0 && nfont < metadata->count / sizeof(void*))
{
FcPattern * p = (FcPattern *)block_ptr;