KTar::KTarPrivate::readLonglink: Fix crash in malformed files

Authored by aacid on May 9 2019, 12:42 PM.

Description

KTar::KTarPrivate::readLonglink: Fix crash in malformed files

Summary:
QByteArray::resize doesn't work for std::numeric_limits<int>::max()
https://bugreports.qt.io/browse/QTBUG-75470

https://codereview.qt-project.org/#/c/260072/1/src/corelib/tools/qbytearray.cpp
documents that it "alwaus"works until 2^31 - 32 so use that

oss-fuzz #14397

Reviewers: apol

Reviewed By: apol

Subscribers: apol, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D20844