[okular] [Bug 435260] Strange checking for signing bounds

Oleg Solovyov bugzilla_noreply at kde.org
Sun Apr 4 11:19:23 BST 2021


https://bugs.kde.org/show_bug.cgi?id=435260

--- Comment #5 from Oleg Solovyov <mcpain at altlinux.org> ---
(In reply to Albert Astals Cid from comment #4)
> I really don't understand with "will treat [0 - 23225], [31227 - 167454] and
> [0  - 167454] as the same".
> 
> Can you clarify?

In the
Document::requestSignedRevisionData(const Okular::SignatureInfo &info)
{
[...]
const QList<qint64> byteRange = info.signedRangeBounds();
f.seek(byteRange.first());
QByteArray data;
QDataStream stream(&data, QIODevice::WriteOnly);
stream << f.read(byteRange.last() - byteRange.first());
f.close();
[...]
}

When byteRange == (0, 167454) the data from bytes 0-167454 will be returned.
What will happen when byteRange == (0, 23225, 31227, 167454)?
As far as I can see from code, the data from bytes 0-167454 will be returned.
Or, speaking differently, the data from bytes 23226-31226 will be included to
byte array we return instead of being skipped because they are not signed and
poppler knows about it, formatting signed ranges in pairs for user.
Okular for some reason behaves differently and grabs first and last item from
byteRange in assumption that it contains the _one and only_ pair.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list