From b80d85fe9ed3b0cf96d03dcfd7d1e1f149c2b718 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 10 May 2006 04:47:35 +0000 Subject: [PATCH] * builds/unix/ftsystem.c (FT_Stream_Open): Avoid infinite loop if given an empty, un-mmap()able file. Reported and suggested fix in Savannah bug #16555. --- ChangeLog | 6 ++++++ builds/unix/ftsystem.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 94c0b44ec..95f0ba180 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-05-10 Werner Lemberg + + * builds/unix/ftsystem.c (FT_Stream_Open): Avoid infinite loop if + given an empty, un-mmap()able file. Reported and suggested fix in + Savannah bug #16555. + 2006-05-09 Rajeev Pahuja * builds/win32/visualc/freetype.sln, diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c index 2253dbac4..78da9d575 100644 --- a/builds/unix/ftsystem.c +++ b/builds/unix/ftsystem.c @@ -303,7 +303,7 @@ stream->base + total_read_count, stream->size - total_read_count ); - if ( ( read_count == -1 ) ) + if ( ( read_count <= 0 ) ) { if ( errno == EINTR ) continue;