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/lzw | |
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/lzw')
-rw-r--r-- | freetype/src/lzw/ftlzw.c | 16 | ||||
-rw-r--r-- | freetype/src/lzw/ftzopen.h | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/freetype/src/lzw/ftlzw.c b/freetype/src/lzw/ftlzw.c index 82e6c0070..e1b3564a5 100644 --- a/freetype/src/lzw/ftlzw.c +++ b/freetype/src/lzw/ftlzw.c @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2004-2006, 2009, 2010, 2012, 2013 by */ +/* Copyright 2004-2006, 2009, 2010, 2012-2014 by */ /* Albert Chin-A-Young. */ /* */ /* Based on code in src/gzip/ftgzip.c, Copyright 2004 by */ @@ -96,8 +96,8 @@ goto Exit; /* head[0] && head[1] are the magic numbers */ - if ( head[0] != 0x1f || - head[1] != 0x9d ) + if ( head[0] != 0x1F || + head[1] != 0x9D ) error = FT_THROW( Invalid_File_Format ); Exit: @@ -349,10 +349,18 @@ FT_Stream source ) { FT_Error error; - FT_Memory memory = source->memory; + FT_Memory memory; FT_LZWFile zip = NULL; + if ( !stream || !source ) + { + error = FT_THROW( Invalid_Stream_Handle ); + goto Exit; + } + + memory = source->memory; + /* * Check the header right now; this prevents allocation of a huge * LZWFile object (400 KByte of heap memory) if not necessary. diff --git a/freetype/src/lzw/ftzopen.h b/freetype/src/lzw/ftzopen.h index f7d2936be..cdc8fd7c1 100644 --- a/freetype/src/lzw/ftzopen.h +++ b/freetype/src/lzw/ftzopen.h @@ -41,7 +41,7 @@ #define LZW_CLEAR 256 #define LZW_FIRST 257 -#define LZW_BIT_MASK 0x1f +#define LZW_BIT_MASK 0x1F #define LZW_BLOCK_MASK 0x80 #define LZW_MASK( n ) ( ( 1U << (n) ) - 1U ) |