[poppler] poppler/UTF.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 6 17:40:08 UTC 2019


 poppler/UTF.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f01d29372721fbbe7a0c761744a5b2bf83af761e
Author: Marek Kasik <mkasik at redhat.com>
Date:   Fri Jul 19 14:04:30 2019 +0200

    Allocate big enough buffer for text conversion
    
    Buffer for conversion from Unicode to ASCII7 can
    be small in some cases leading to invalid writes
    which can result in crash.
    This commit increases size of the buffer.

diff --git a/poppler/UTF.cc b/poppler/UTF.cc
index e34ac934..32a13d46 100644
--- a/poppler/UTF.cc
+++ b/poppler/UTF.cc
@@ -446,7 +446,7 @@ void unicodeToAscii7(Unicode *in, int len, Unicode **ucs4_out,
     if (!in_idx)
       indices = nullptr;
     else
-      idx = (int *) gmallocn(len * 2 + 1, sizeof(int));
+      idx = (int *) gmallocn(len * 8 + 1, sizeof(int));
   }
 
   GooString gstr;


More information about the poppler mailing list