Fix Savannah bug #30644. * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
diff --git a/ChangeLog b/ChangeLog
index b430b10..66e67a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2010-08-04 Werner Lemberg <wl@gnu.org>
+ Fix Savannah bug #30644.
+
+ * src/base/ftstream.c (FT_Stream_EnterFrame): Fix comparison.
+
+2010-08-04 Werner Lemberg <wl@gnu.org>
+
`make devel' fails if FT_CONFIG_OPTION_OLD_INTERNALS is set.
* devel/ftoption.h: Synchronize with
diff --git a/src/base/ftstream.c b/src/base/ftstream.c
index 9b087ac..210aaa4 100644
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -287,7 +287,7 @@
{
/* check current and new position */
if ( stream->pos >= stream->size ||
- stream->pos + count > stream->size )
+ stream->size - stream->pos < count )
{
FT_ERROR(( "FT_Stream_EnterFrame:"
" invalid i/o; pos = 0x%lx, count = %lu, size = 0x%lx\n",