freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master 53838ce: [bzip2, gzip] Avoid access of unitialized me


From: Werner LEMBERG
Subject: [freetype2] master 53838ce: [bzip2, gzip] Avoid access of unitialized memory (#46109).
Date: Sat, 03 Oct 2015 19:13:28 +0000

branch: master
commit 53838ce01628ba39596625c9edf9d8f5b13a56b4
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [bzip2, gzip] Avoid access of unitialized memory (#46109).
    
    * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
    (ft_gzip_file_fill_output): In case of an error, adjust the limit to
    avoid copying uninitialized memory.
---
 ChangeLog           |    8 ++++++++
 src/bzip2/ftbzip2.c |    3 ++-
 src/gzip/ftgzip.c   |    3 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9e24509..b0946c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2015-10-03  Werner Lemberg  <address@hidden>
+
+       [bzip2, gzip] Avoid access of unitialized memory (#46109).
+
+       * src/bzip2/ftbzip2.c (ft_bzip2_file_fill_output), src/gzip/ftgzip.c
+       (ft_gzip_file_fill_output): In case of an error, adjust the limit to
+       avoid copying uninitialized memory.
+
 2015-10-01  Alexei Podtelezhnikov  <address@hidden>
 
        [smooth] Clean up worker.
diff --git a/src/bzip2/ftbzip2.c b/src/bzip2/ftbzip2.c
index 86f8be8..d4a85f2 100644
--- a/src/bzip2/ftbzip2.c
+++ b/src/bzip2/ftbzip2.c
@@ -310,7 +310,8 @@
       }
       else if ( err != BZ_OK )
       {
-        error = FT_THROW( Invalid_Stream_Operation );
+        zip->limit = zip->cursor;
+        error      = FT_THROW( Invalid_Stream_Operation );
         break;
       }
     }
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index 452768b..36134a8 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -433,7 +433,8 @@
       }
       else if ( err != Z_OK )
       {
-        error = FT_THROW( Invalid_Stream_Operation );
+        zip->limit = zip->cursor;
+        error      = FT_THROW( Invalid_Stream_Operation );
         break;
       }
     }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]