Commit 9f92feda authored by Thomas Freitag's avatar Thomas Freitag Committed by Albert Astals Cid
Browse files

Memory leak in CharCodeToUnicode

Bug #54702
parent ef11b4f0
......@@ -459,12 +459,14 @@ void CharCodeToUnicode::addMapping(CharCode code, char *uStr, int n,
Unicode *utf16 = (Unicode*)gmallocn(utf16Len, sizeof(Unicode));
for (j = 0; j < utf16Len; ++j) {
if (!parseHex(uStr + j*4, 4, &utf16[j])) {
gfree(utf16);
error(errSyntaxWarning, -1, "Illegal entry in ToUnicode CMap");
return;
}
}
utf16[utf16Len - 1] += offset;
sMap[sMapLen].len = UTF16toUCS4(utf16, utf16Len, &sMap[sMapLen].u);
gfree(utf16);
++sMapLen;
}
}
......
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