From c12956e700641ed330c6a2ef764963b57ccdabc4 Mon Sep 17 00:00:00 2001 From: Werner Lemberg <wl@gnu.org> Date: Fri, 9 Oct 2015 09:38:32 +0200 Subject: [PATCH] * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size. --- ChangeLog | 4 ++++ src/gzip/ftgzip.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a22466b6d..afd34e9c9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-10-09 Werner Lemberg <wl@gnu.org> + + * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Use real stream size. + 2015-10-08 Werner Lemberg <wl@gnu.org> [pcf] Protect against invalid number of TOC entries (#46159). diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c index 422035c00..27c625420 100644 --- a/src/gzip/ftgzip.c +++ b/src/gzip/ftgzip.c @@ -691,9 +691,13 @@ } error = FT_Err_Ok; } + + if ( zip_size ) + stream->size = zip_size; + else + stream->size = 0x7FFFFFFFL; /* don't know the real size! */ } - stream->size = 0x7FFFFFFFL; /* don't know the real size! */ stream->pos = 0; stream->base = NULL; stream->read = ft_gzip_stream_io;