Commit f076169d authored by Patrick Lam's avatar Patrick Lam
Browse files

Insert check for integer overflow in # of fonts.

reviewed by: plam
parent 788c4af2
2006-02-06 Dirk Mueller <dmueller@suse.de>
reviewed by: plam
* src/fcfs.c (FcFontSetUnserialize):
Insert check for integer overflow in # of fonts.
2006-02-04 Behdad Esfahbod <behdad@cs.toronto.edu>
reviewed by: plam
......
......@@ -159,7 +159,7 @@ FcFontSetUnserialize(FcCache * metadata, FcFontSet * s, void * block_ptr)
nfont = *(int *)block_ptr;
block_ptr = (int *)block_ptr + 1;
if (nfont > 0)
if (nfont > 0 && nfont < metadata.count)
{
FcPattern * p = (FcPattern *)block_ptr;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment