Commit 230652c1 authored by Oliver Sander's avatar Oliver Sander Committed by Albert Astals Cid
Browse files

Fix memory handling bug

The CIDToGID map is an array of ints.  The code properly allocated
a number N of ints, but then used memcpy for N unsigned shorts.
That left the upper half of the array uninitialized.
parent 13ed7018
......@@ -673,7 +673,7 @@ void ArthurOutputDev::updateFont(GfxState *state)
if (codeToGIDLen) {
codeToGID = (int *)gmallocn(codeToGIDLen, sizeof(int));
memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
codeToGIDLen * sizeof(unsigned short));
codeToGIDLen * sizeof(int));
} else {
auto ff = (fontLoc->locType != gfxFontLocEmbedded)
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