mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 07:08:08 +02:00
*Please note:* This patch on its own is *not* sufficient to address the underlying problem in the referenced issue, hence why no test-case is included since the *actual* bug still needs to be fixed. As can be seen in the specification, https://tc39.es/ecma262/#sec-string.fromcodepoint, `String.fromCodePoint` will throw a RangeError for invalid code points. In the event that a CMap, in a composite font, contains invalid data and/or we fail to parse it correctly, it's thus possible that the glyph mapping that we build end up with entires that cause `String.fromCodePoint` to throw and thus `Font.charToGlyph` to break. If that happens, as is the case in issue 11768, significant portions of a page/document may fail to render which seems very unfortunate. While this patch doesn't fix the underlying problem, it's hopefully deemed useful not only for the referenced issue but also to prevent similar bugs in the future. |
||
---|---|---|
.. | ||
core | ||
display | ||
images | ||
shared | ||
doc_helper.js | ||
interfaces.js | ||
license_header.js | ||
license_header_libre.js | ||
pdf.image_decoders.js | ||
pdf.js | ||
pdf.worker.entry.js | ||
pdf.worker.js | ||
worker_loader.js |