diff options
author | marha <marha@users.sourceforge.net> | 2009-12-21 15:22:51 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-12-21 15:22:51 +0000 |
commit | 1ee02cd0419021c3d4950af2619da39c6e9c47f0 (patch) | |
tree | f5b61f7d9e151c7a64cff51399560ffb77800349 /freetype/src/lzw | |
parent | d8432fdd4f13e9f9d1d44f5482faeb56562661a9 (diff) | |
download | vcxsrv-1ee02cd0419021c3d4950af2619da39c6e9c47f0.tar.gz vcxsrv-1ee02cd0419021c3d4950af2619da39c6e9c47f0.tar.bz2 vcxsrv-1ee02cd0419021c3d4950af2619da39c6e9c47f0.zip |
Updated to freetype-2.3.11
Diffstat (limited to 'freetype/src/lzw')
-rw-r--r-- | freetype/src/lzw/ftlzw.c | 4 | ||||
-rw-r--r-- | freetype/src/lzw/ftzopen.c | 9 | ||||
-rw-r--r-- | freetype/src/lzw/ftzopen.h | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/freetype/src/lzw/ftlzw.c b/freetype/src/lzw/ftlzw.c index a00bd5012..4f601a16d 100644 --- a/freetype/src/lzw/ftlzw.c +++ b/freetype/src/lzw/ftlzw.c @@ -42,6 +42,10 @@ #ifdef FT_CONFIG_OPTION_USE_LZW +#ifdef FT_CONFIG_OPTION_PIC +#error "lzw code does not support PIC yet" +#endif + #include "ftzopen.h" diff --git a/freetype/src/lzw/ftzopen.c b/freetype/src/lzw/ftzopen.c index fc7831510..8bc65c8f5 100644 --- a/freetype/src/lzw/ftzopen.c +++ b/freetype/src/lzw/ftzopen.c @@ -8,7 +8,7 @@ /* be used to parse compressed PCF fonts, as found with many X11 server */ /* distributions. */ /* */ -/* Copyright 2005, 2006, 2007 by David Turner. */ +/* Copyright 2005, 2006, 2007, 2009 by David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -113,8 +113,8 @@ { FT_Memory memory = state->memory; FT_Error error; - FT_UInt old_size = state->stack_size; - FT_UInt new_size = old_size; + FT_Offset old_size = state->stack_size; + FT_Offset new_size = old_size; new_size = new_size + ( new_size >> 1 ) + 4; @@ -332,6 +332,9 @@ while ( code >= 256U ) { + if ( !state->prefix ) + goto Eof; + FTLZW_STACK_PUSH( state->suffix[code - 256] ); code = state->prefix[code - 256]; } diff --git a/freetype/src/lzw/ftzopen.h b/freetype/src/lzw/ftzopen.h index dd602402a..f7d2936be 100644 --- a/freetype/src/lzw/ftzopen.h +++ b/freetype/src/lzw/ftzopen.h @@ -118,7 +118,7 @@ FT_Int buf_offset; FT_Int buf_size; FT_Bool buf_clear; - FT_Int buf_total; + FT_Offset buf_total; FT_UInt max_bits; /* max code bits, from file header */ FT_Int block_mode; /* block mode flag, from file header */ @@ -137,7 +137,7 @@ FT_Byte* stack; /* character stack */ FT_UInt stack_top; - FT_UInt stack_size; + FT_Offset stack_size; FT_Byte stack_0[FT_LZW_DEFAULT_STACK_SIZE]; /* minimize heap alloc */ FT_Stream source; /* source stream */ |