* src/type1/t1parse.c (pfb_tag_fields): Removed.
(read_pfb_tag): Fix code so that it doesn't fail on end-of-file indicated (0x8003).
This commit is contained in:
parent
656f7fd981
commit
cce1c9964e
@ -1,3 +1,9 @@
|
||||
2003-09-19 David Bevan <dbevan@emtex.com>
|
||||
|
||||
* src/type1/t1parse.c (pfb_tag_fields): Removed.
|
||||
(read_pfb_tag): Fix code so that it doesn't fail on end-of-file
|
||||
indicated (0x8003).
|
||||
|
||||
2003-09-16 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
* include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE,
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* Type 1 parser (body). */
|
||||
/* */
|
||||
/* Copyright 1996-2001, 2002 by */
|
||||
/* Copyright 1996-2001, 2002, 2003 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -79,20 +79,6 @@
|
||||
} PFB_Tag;
|
||||
|
||||
|
||||
#undef FT_STRUCTURE
|
||||
#define FT_STRUCTURE PFB_Tag
|
||||
|
||||
|
||||
static
|
||||
const FT_Frame_Field pfb_tag_fields[] =
|
||||
{
|
||||
FT_FRAME_START( 6 ),
|
||||
FT_FRAME_USHORT ( tag ),
|
||||
FT_FRAME_LONG_LE( size ),
|
||||
FT_FRAME_END
|
||||
};
|
||||
|
||||
|
||||
static FT_Error
|
||||
read_pfb_tag( FT_Stream stream,
|
||||
FT_UShort* tag,
|
||||
@ -104,14 +90,18 @@
|
||||
|
||||
*tag = 0;
|
||||
*size = 0;
|
||||
if ( !FT_STREAM_READ_FIELDS( pfb_tag_fields, &head ) )
|
||||
|
||||
if ( !FT_READ_USHORT( head.tag ) )
|
||||
{
|
||||
if ( head.tag == 0x8001U || head.tag == 0x8002U )
|
||||
{
|
||||
*tag = head.tag;
|
||||
*size = head.size;
|
||||
if ( !FT_READ_LONG_LE( head.size ) )
|
||||
*size = head.size;
|
||||
}
|
||||
|
||||
*tag = head.tag;
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user