Commit f01d2937 authored by Marek Kasik's avatar Marek Kasik Committed by Albert Astals Cid

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.
parent ac485b03
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment