Menu

#44 Segfault when (un)checking file without selecting the line

v1.0 (example)
open
nobody
None
5
2014-07-13
2014-07-13
Fab Stz
No

In Synkron, make an analysis and then in the list of files to synchronize, click on the checkbox of a file directly without clicking on any line prior to that.
In Linux Debian 7 (wheezy), this conducts to a crash/segmentation fault. (running QT 4.8.2)

Suggested patch (to be reviewed) is :

--- synkron-1.6.2.orig/src/analyse.cpp
+++ synkron-1.6.2/src/analyse.cpp
@@ -706,7 +706,12 @@ void AbstractSyncPage::analyseTreeItemEx

void AbstractSyncPage::analyseTreeItemClicked(QTreeWidgetItem * item, int column)
{

  • if (analyseTree()->currentItem()->data(0, Qt::UserRole).toStringList().first() == "[container]") return;
  • QTreeWidgetItem * myQTreeWidgetItem = analyseTree()->currentItem();
  • if (myQTreeWidgetItem!=NULL) {
  • bool test1 = analyseTree()->currentItem()->data(0, Qt::UserRole).toStringList().first() == "[container]";
  • bool test2 = item->data(0, Qt::UserRole).toStringList().at(0) == "[container]";
  • if (test1 && test2) return;
  • }
    if (column != 0) return;
    if (ignore_blacklist->isChecked()) return;
    if (item->isDisabled()) return;

Discussion


Log in to post a comment.