Insert check for integer overflow in # of fonts.
reviewed by: plam
This commit is contained in:
parent
788c4af232
commit
f076169d19
|
@ -1,3 +1,10 @@
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue