[cid] Avoid segfault with malformed input (#46250).
* src/cid/cidload.c (cid_read_subrs): Return a proper error code for unsorted offsets.
This commit is contained in:
parent
5cf83a5335
commit
d47d372c96
|
@ -1,3 +1,10 @@
|
|||
2015-10-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cid] Avoid segfault with malformed input (#46250).
|
||||
|
||||
* src/cid/cidload.c (cid_read_subrs): Return a proper error code for
|
||||
unsorted offsets.
|
||||
|
||||
2015-10-20 StudioEtrange <nomorgan@gmail.com>
|
||||
|
||||
* CMakeLists.txt: Enable shared library builds on MinGW (#46233).
|
||||
|
|
|
@ -484,7 +484,11 @@
|
|||
/* offsets must be ordered */
|
||||
for ( count = 1; count <= num_subrs; count++ )
|
||||
if ( offsets[count - 1] > offsets[count] )
|
||||
{
|
||||
FT_TRACE1(( "cid_read_subrs: offsets are not ordered\n" ));
|
||||
error = FT_THROW( Syntax_Error );
|
||||
goto Fail;
|
||||
}
|
||||
|
||||
/* now, compute the size of subrs charstrings, */
|
||||
/* allocate, and read them */
|
||||
|
|
Loading…
Reference in New Issue