diff options
author | Marek Kasik <mkasik@redhat.com> | 2019-07-19 14:04:30 +0200 |
---|---|---|
committer | Albert Astals Cid <tsdgeos@yahoo.es> | 2019-12-06 11:51:15 +0000 |
commit | f01d29372721fbbe7a0c761744a5b2bf83af761e (patch) | |
tree | 449f0d8472216a8ed7a2e4cf486ca0d2ca09c829 | |
parent | ac485b0309f5e51d74fdb7484b9f6a7f79448f52 (diff) |
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.
-rw-r--r-- | poppler/UTF.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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; |