Review Request 114226: Make KLimitedIODevice::bytesAvailable return the numbers of bytesAvaliable to read

Albert Astals Cid aacid at kde.org
Sat Nov 30 18:40:36 GMT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/114226/
-----------------------------------------------------------

Review request for kdelibs and David Faure.


Bugs: 328182
    http://bugs.kde.org/show_bug.cgi?id=328182


Repository: kdelibs


Description
-------

At the moment KLimitedIODevice::bytesAvailable is always returning the size of the file, so QIODevice::atEnd never returns true because it thinks there are more bytes to read. This makes that if you feed an "invalid" svg like "<?xml version="1.0"?>" to the QImageReader it infinite loops believing there will be more stuff to read but then read() always returns 0 but then bytesAvailable says there are more and it stays there forever.


Diffs
-----

  kdecore/io/klimitediodevice.cpp c93463b 

Diff: http://git.reviewboard.kde.org/r/114226/diff/


Testing
-------

The svg renderer does not end loop anymore


Thanks,

Albert Astals Cid

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131130/cec3769e/attachment.htm>


More information about the kde-core-devel mailing list