Git commit 64a7238c3c082b174e47c3896d6eb0f5c52ab461 by Albert Astals Cid. Committed on 30/11/2013 at 21:33. Pushed by aacid into branch 'KDE/4.11'. Make KLimitedIODevice::bytesAvailable return the numbers of bytesAvaliable = to read At the moment KLimitedIODevice::bytesAvailable is returning at least the si= ze of the file, so QIODevice::atEnd never returns true because it thinks th= ere are more bytes to read. This makes that if you feed an "invalid" svg li= ke "" to the QImageReader it infinite loops believin= g there will be more stuff to read but then read() always returns 0 but the= n bytesAvailable says there are more and it stays there forever. BUGS: 328182 FIXED-IN: 4.11.5 REVIEW: 114226 M +1 -1 kdecore/io/klimitediodevice.cpp http://commits.kde.org/kdelibs/64a7238c3c082b174e47c3896d6eb0f5c52ab461 diff --git a/kdecore/io/klimitediodevice.cpp b/kdecore/io/klimitediodevice.= cpp index c93463b..9ec5901 100644 --- a/kdecore/io/klimitediodevice.cpp +++ b/kdecore/io/klimitediodevice.cpp @@ -71,7 +71,7 @@ bool KLimitedIODevice::seek( qint64 pos ) = qint64 KLimitedIODevice::bytesAvailable() const { - return m_length + QIODevice::bytesAvailable(); + return QIODevice::bytesAvailable(); } = bool KLimitedIODevice::isSequential() const