Package: sqlitebrowser
Version: 1.3-2.3
Severity: normal
Tags: +patch
Hello.
It appears that there is error when trying to import database from file
(.sql) and not choosing new database file name when prompted.
When file dialog opens, and user clicks reject action button (No/Abort)
then newDBfile becomes empty QString. Then db.create() is called with
empty parameter and SQLite code (implemented in sqlitedb.cpp
function bool DBBrowserDB::create ( const QString & db) that calls
deprecated function QString::utf8()).
Application crashes:
*** glibc detected *** sqlitebrowser: free(): invalid pointer
Maybe something like this could help:
--- form1.ui.h.old 2011-03-10 15:51:05.000000000 +0100
+++ form1.ui.h 2011-03-10 15:49:22.000000000 +0100
@@ -1071,7 +1071,7 @@
QMessageBox::information( this, applicationName ,err);
return;
}
- if (!fileName.isNull())
+ if ((!fileName.isNull()) && (!newDbFile.isNull()))
{
db.create(newDBfile);
}
I'm not sure about this solution as I'm not able to test it, because
this version of sqlitebrowser requires old Qt-Designer and QT3.
Regards.
--
Grzegorz Bizon
ntsn.pl Software Development
http://ntsn.pl
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]