[truetype] Sanitizer fix.
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array to fix nested loops.
This commit is contained in:
parent
a3b70d76ba
commit
e69f34b1e2
|
@ -1,3 +1,10 @@
|
||||||
|
2016-07-19 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
[truetype] Sanitizer fix.
|
||||||
|
|
||||||
|
* src/truetype/ttgxvar.c (ft_var_readpackedpoints): Increase array
|
||||||
|
to fix nested loops.
|
||||||
|
|
||||||
2016-07-18 Werner Lemberg <wl@gnu.org>
|
2016-07-18 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[truetype] Make GETDATA work only for GX fonts.
|
[truetype] Make GETDATA work only for GX fonts.
|
||||||
|
|
|
@ -158,13 +158,16 @@
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( FT_NEW_ARRAY( points, n ) )
|
/* in the nested loops below we increase `i' twice; */
|
||||||
|
/* it is faster to simply allocate one more slot */
|
||||||
|
/* than to add another test within the loop */
|
||||||
|
if ( FT_NEW_ARRAY( points, n + 1 ) )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
*point_cnt = n;
|
*point_cnt = n;
|
||||||
|
|
||||||
first = 0;
|
first = 0;
|
||||||
i = 0;
|
i = 0;
|
||||||
while ( i < n )
|
while ( i < n )
|
||||||
{
|
{
|
||||||
runcnt = FT_GET_BYTE();
|
runcnt = FT_GET_BYTE();
|
||||||
|
|
Loading…
Reference in New Issue