When reading lines in a loop, also check if we reached the end of the device just to be sure
svn path=/trunk/KDE/kdepim/runtime/resources/mbox/libmbox/; revision=1131201