Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
None
-
5.11.0 Beta 1
Description
QPdfEngine::drawHyperlink uses xprintf to output encoded url to pdf.
Problem is that xprintf works with fixed buffer and urls could be bigger, especially with a lot of non-latin1 encoding stuff. Use of xprintf here leads to incorrect pdf generated.
line:
d->xprintf("/Type /Action\n/S /URI\n/URI (%s)\n", url_esc.constData());
should be replaced with:
d->xprintf("/Type /Action\n/S /URI\n/URI ("); d->stream->writeRawData(url_esc.constData(), url_esc.size()); d->streampos += url_esc.size(); d->xprintf(")\n");
Attachments
For Gerrit Dashboard: QTBUG-66788 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
223541,4 | PDF engine: handle abnormally long string cases | 5.11 | qt/qtbase | Status: MERGED | +2 | 0 |