diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2019-09-21 08:32:02 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2019-09-21 08:32:02 +0000 |
| commit | ebe98834792584fd8c1d0fee58379debe0afbede (patch) | |
| tree | 1c45b8ecb3e2aa2a9157796b1daea85017533fb6 /src/libnrtype | |
| parent | Make sure all conditions reached (minor touchup) (diff) | |
| download | inkscape-ebe98834792584fd8c1d0fee58379debe0afbede.tar.gz inkscape-ebe98834792584fd8c1d0fee58379debe0afbede.zip | |
Fix segfault when reading Bixia SVG in OpenType font.
Fixes https://gitlab.com/inkscape/inbox/issues/845
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/OpenTypeUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libnrtype/OpenTypeUtil.cpp b/src/libnrtype/OpenTypeUtil.cpp index 2b60cca9e..f9a148c3a 100644 --- a/src/libnrtype/OpenTypeUtil.cpp +++ b/src/libnrtype/OpenTypeUtil.cpp @@ -366,7 +366,7 @@ void readOpenTypeSVGTable(const FT_Face ft_face, // std::cout << "Offset: " << offset << std::endl; // Bytes 6-9 are reserved. - uint16_t entries = (data[offset] << 8) + data[offset+1]; + uint16_t entries = ((data[offset] & 0xff) << 8) + (data[offset+1] & 0xff); // std::cout << "Number of entries: " << entries << std::endl; for (int entry = 0; entry < entries; ++entry) { |
