[PATCH] .desktop security ++
David Faure
faure at kde.org
Sat Feb 21 12:08:31 GMT 2009
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 at kde.org, sponsored by Qt Software @ Nokia to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel
mailing list