[Pkg-kde-bugs-fwd] [Bug 104454] crash when displaying meta info of file being downloaded
David Faure
104454@bugs.kde.org
17 Jun 2005 17:27:27 -0000
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
http://bugs.kde.org/show_bug.cgi?id=104454
------- Additional Comments From faure kde org 2005-06-17 19:27 -------
SVN commit 426556 by dfaure:
Fix KTar crash, e.g. when displaying the tooltip for a .deb file.
tmpFile wasn't initialized to 0 in both constructors(!)
CCBUG: 104454
M +5 -6 ktar.cpp
--- trunk/KDE/kdelibs/kio/kio/ktar.cpp #426555:426556
@ -45,7 +45,7 @
class KTar::KTarPrivate
{
public:
- KTarPrivate() : tarEnd( 0 ) {}
+ KTarPrivate() : tarEnd( 0 ), tmpFile( 0 ) {}
QStringList dirList;
int tarEnd;
KTempFile* tmpFile;
@ -57,12 +57,10 @
};
KTar::KTar( const QString& filename, const QString & _mimetype )
- : KArchive( 0L )
+ : KArchive( 0 )
{
m_filename = filename;
d = new KTarPrivate;
- d->tmpFile = 0L;
- d->mimetype = _mimetype;
QString mimetype( _mimetype );
bool forced = true;
if ( mimetype.isEmpty() ) // Find out mimetype manually
@ -107,8 +105,8 @
file.close();
}
forced = false;
- d->mimetype = mimetype;
- } // END mimetype.isEmpty()
+ }
+ d->mimetype = mimetype;
prepareDevice( filename, mimetype, forced );
}
@ -144,6 +142,7 @
KTar::KTar( QIODevice * dev )
: KArchive( dev )
{
+ Q_ASSERT( dev );
d = new KTarPrivate;
}