diff options
author | marha <marha@users.sourceforge.net> | 2015-02-22 14:47:01 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-02-22 14:47:01 +0100 |
commit | 7785694244cdfc5939ca4754cab4e08bd6980f99 (patch) | |
tree | e317021c83941073a12d69494425f0dbcbc9eaf8 /freetype/src/bzip2 | |
parent | c9aad1ae6227c434d480d1d3aa8eae3c3c910c18 (diff) | |
download | vcxsrv-7785694244cdfc5939ca4754cab4e08bd6980f99.tar.gz vcxsrv-7785694244cdfc5939ca4754cab4e08bd6980f99.tar.bz2 vcxsrv-7785694244cdfc5939ca4754cab4e08bd6980f99.zip |
Upgraded to freetype 2.5.5
Diffstat (limited to 'freetype/src/bzip2')
-rw-r--r-- | freetype/src/bzip2/ftbzip2.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/freetype/src/bzip2/ftbzip2.c b/freetype/src/bzip2/ftbzip2.c index 749413027..7e406b161 100644 --- a/freetype/src/bzip2/ftbzip2.c +++ b/freetype/src/bzip2/ftbzip2.c @@ -8,7 +8,7 @@ /* parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2010, 2012, 2013 by */ +/* Copyright 2010, 2012-2014 by */ /* Joel Klinghed. */ /* */ /* Based on src/gzip/ftgzip.c, Copyright 2002 - 2010 by */ @@ -131,7 +131,7 @@ /* head[0] && head[1] are the magic numbers; */ /* head[2] is the version, and head[3] the blocksize */ if ( head[0] != 0x42 || - head[1] != 0x5a || + head[1] != 0x5A || head[2] != 0x68 ) /* only support bzip2 (huffman) */ { error = FT_THROW( Invalid_File_Format ); @@ -456,10 +456,18 @@ FT_Stream source ) { FT_Error error; - FT_Memory memory = source->memory; + FT_Memory memory; FT_BZip2File zip = NULL; + if ( !stream || !source ) + { + error = FT_THROW( Invalid_Stream_Handle ); + goto Exit; + } + + memory = source->memory; + /* * check the header right now; this prevents allocating unnecessary * objects when we don't need them |