From kde-commits Tue Jan 30 16:11:32 2007 From: =?utf-8?q?Andr=C3=A9_W=C3=B6bbeking?= Date: Tue, 30 Jan 2007 16:11:32 +0000 To: kde-commits Subject: Re: KDE/kdelibs/kdoctools [POSSIBLY UNSAFE] Message-Id: <200701301711.32747.Woebbeking () kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=117019828025581 On Saturday 27 January 2007, Christian Ehrlicher wrote: > SVN commit 627707 by chehrlic: > > some fixes for win32, now it crashes in bzip2filter.cpp ... > xmllint needs some fixes to > can't we use QProcess instead popen() here? > > M +21 -12 meinproc.cpp [POSSIBLY UNSAFE: popen] > > > --- trunk/KDE/kdelibs/kdoctools/meinproc.cpp #627706:627707 > @@ -89,8 +89,17 @@ > }; > > > +static bool isExecutable(const QString &exe) > +{ > + if( exe.isEmpty() ) > + return false; > +#ifdef Q_OS_WIN > + return ( exe.endsWith( ".exe" ) || exe.endsWith( ".bat" ) ); > +#else > + return ::access( QFile::encodeName( exe ), X_OK ); > +#endif > +} shouldn't QFileInfo::isExecutable() be used here or is it still too expensive?