realpath() security issue, potential fix

David Faure faure at
Mon Aug 9 22:19:33 BST 2004

On Monday 09 August 2004 22:42, Michael Pyne wrote:
> > Anyway.... doesn't QDir::canonicalPath() do this already?
> QDir::canonicalPath() does do this, but from reading the source, they call
> realpath() also, at least when I checked while writing this replacement.

Then IMHO you should send your code to qt-bugs at to suggest that
they use it in QDir::canonicalPath(). Let's first try to fix things at the right place
before making up redundant APIs :)

David Faure, faure at, sponsored by Trolltech to work on KDE,
Konqueror (, and KOffice (

More information about the kde-core-devel mailing list