diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2021-01-08 20:43:21 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2021-01-09 09:04:29 +0000 |
commit | 05706bd2b005dd159be34107cc43c92e7f12eb35 (patch) | |
tree | 748a427d8767f6dedde553ac2dc7334b49420197 /src/gui | |
parent | d26da5fc095aa45d0589113706c1cc0906f7ce41 (diff) |
QPdfWriter: fix embedding fonts in pdf files
The container size change from int32_t to int64_t created a subtle error
during font serialization. The size of a QByteArray was serialized
without a proper cast and therefore now 8 bytes instead 4 bytes were
written to the stream.
Fixes: QTBUG-89727
Pick-to: 6.0
Change-Id: If9255a5a3124038356bc5053810f98c7c88f8a01
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qfontsubset.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontsubset.cpp b/src/gui/text/qfontsubset.cpp index 875ff34a62..93ab5e27db 100644 --- a/src/gui/text/qfontsubset.cpp +++ b/src/gui/text/qfontsubset.cpp @@ -1127,7 +1127,7 @@ static QByteArray bindFont(const QList<QTtfTable>& _tables) f << t.tag << checksum(t.data) << table_offset - << t.data.size(); + << quint32(t.data.size()); table_offset += size; #define TAG(x) char(t.tag >> 24) << char((t.tag >> 16) & 0xff) << char((t.tag >> 8) & 0xff) << char(t.tag & 0xff) //qDebug() << "table " << TAG(t.tag) << "has size " << t.data.size() << "stream at " << f.offset(); |