From kde-core-devel Sat Feb 21 12:08:31 2009 From: David Faure Date: Sat, 21 Feb 2009 12:08:31 +0000 To: kde-core-devel Subject: Re: [PATCH] .desktop security ++ Message-Id: <200902211308.32054.faure () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=123521820024632 On Saturday 21 February 2009, Michael Pyne wrote: >  I'm not really happy about manually moving > bytes around (especially as v1 in my testing today had an infinite loop) but I > don't trust readAll()/write() for library code.  Please look at this to make > sure I've done it right. I don't understand, what's wrong with readAll? kdecore sure uses it in quite a few places. And it's not like any .desktop file is going to be 100 MB in size... > + // A mere half-write isn't a failure mode I care to code about It would be easy though if (saveFile.write(shebang) != shebang.size()) { ... } BTW: can you reindent to 4 spaces? kdelibs coding style, even if the rest of krun.cpp might not use it yet, but we'll get there eventually. -- David Faure, faure@kde.org, sponsored by Qt Software @ Nokia to work on KDE, Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).