shithub: freetype+ttf2subf

Download patch

ref: 0a263a8b3130c0156a9851f1224a63938be0adef
parent: 52cd0fc8b9a76b4bee8d4fab7aa0409a85900970
author: Werner Lemberg <[email protected]>
date: Tue Nov 25 00:44:41 EST 2008

* src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
before the NULL check.  From Savannah patch #6681.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-25  Daniel Zimmermann  <[email protected]>
+
+	* src/base/ftstream.c (FT_Stream_ReadFields): Don't access stream
+	before the NULL check.  From Savannah patch #6681.
+
 2008-11-24  Werner Lemberg  <[email protected]>
 
 	Fixes from the gnuwin32 port.
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -707,11 +707,12 @@
   {
     FT_Error  error;
     FT_Bool   frame_accessed = 0;
-    FT_Byte*  cursor = stream->cursor;
+    FT_Byte*  cursor;
 
-
     if ( !fields || !stream )
       return FT_Err_Invalid_Argument;
+
+    cursor = stream->cursor;
 
     error = FT_Err_Ok;
     do