aboutsummaryrefslogtreecommitdiff
path: root/freetype/src/bzip2
diff options
context:
space:
mode:
authorMike DePaulo <mikedep333@gmail.com>2015-02-28 07:31:25 -0500
committerMike DePaulo <mikedep333@gmail.com>2015-02-28 07:31:25 -0500
commit05f00e318b7842595179ad4d228dfaee5e992951 (patch)
tree65059975d8e906513b01e7161caf87e7772674cf /freetype/src/bzip2
parent67f9dfd6bae84de480e0f4407d5ee27fccc34d9f (diff)
downloadvcxsrv-05f00e318b7842595179ad4d228dfaee5e992951.tar.gz
vcxsrv-05f00e318b7842595179ad4d228dfaee5e992951.tar.bz2
vcxsrv-05f00e318b7842595179ad4d228dfaee5e992951.zip
Updated to freetype 2.5.5
Diffstat (limited to 'freetype/src/bzip2')
-rw-r--r--freetype/src/bzip2/ftbzip2.c14
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