[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdoctools [POSSIBLY UNSAFE]
From:       Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date:       2007-01-30 16:25:13
Message-ID: 45BF7169.60906 () gmx ! de
[Download RAW message or body]


André Wöbbeking schrieb:
> 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?
> 
I was not aware of this function (shame on me) and don't think it's to 
expensive - at least not in that context (it's called a maximum of two 
times pre run of meinproc).

Christian


["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic