mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-09 11:41:01 +02:00
Merge pull request #21031 from calixteman/fix_font_int16
Fix wrong values when sanitizing fonts
This commit is contained in:
commit
264c2bf6f9
@ -2029,7 +2029,7 @@ class Font {
|
||||
data[3] = 0;
|
||||
}
|
||||
|
||||
const indexToLocFormat = int16(data[50], data[51]);
|
||||
const indexToLocFormat = signedInt16(data[50], data[51]);
|
||||
if (indexToLocFormat < 0 || indexToLocFormat > 1) {
|
||||
info(
|
||||
"Attempting to fix invalid indexToLocFormat in head table: " +
|
||||
@ -2397,7 +2397,7 @@ class Font {
|
||||
} else {
|
||||
for (j = 0; j < n; j++) {
|
||||
b = data[i++];
|
||||
stack.push((b << 8) | data[i++]);
|
||||
stack.push(signedInt16(b, data[i++]));
|
||||
}
|
||||
}
|
||||
} else if ((op & 0xf8) === 0xb0) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user