(cid_parser_new): Exit properly if no `StartData' has been seen at all.
This commit is contained in:
parent
936346413f
commit
4d2815db50
|
@ -2,6 +2,7 @@
|
|||
|
||||
* src/cid/cidparse.c (cid_parser_new): Don't continue second search
|
||||
pass for `StartData' if an error has occurred.
|
||||
Exit properly if no `StartData' has been seen at all.
|
||||
|
||||
* builds/unix/ftsystem.c (FT_Stream_Open): Don't use ULONG_MAX but
|
||||
LONG_MAX to avoid compiler warning. Suggested by Sean McBride.
|
||||
|
|
|
@ -98,7 +98,11 @@
|
|||
|
||||
stream_len = stream->size - FT_STREAM_POS();
|
||||
if ( stream_len == 0 )
|
||||
{
|
||||
FT_TRACE2(( "cid_parser_new: no `StartData' keyword found\n" ));
|
||||
error = CID_Err_Unknown_File_Format;
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
read_len = FT_MIN( read_len, stream_len );
|
||||
if ( FT_STREAM_READ( p, read_len ) )
|
||||
|
|
Loading…
Reference in New Issue