Ticket #11553: 0003-ColumnListView-Fix-two-bugs-reported-by-Coverity.patch

File 0003-ColumnListView-Fix-two-bugs-reported-by-Coverity.patch, 943 bytes (added by cdesai, 4 years ago)
  • src/kits/interface/ColumnListView.cpp

    From 6cf752572e392551871cd73f2b8c163f7733848f Mon Sep 17 00:00:00 2001
    From: Chirayu Desai <chirayudesai1@gmail.com>
    Date: Tue, 2 Dec 2014 23:25:27 +0530
    Subject: [PATCH 3/3] ColumnListView: Fix two bugs reported by Coverity
    
    * Fix Coverity bug 991147: Copy-paste error
    * Fix Coverity bug 991264: Dereference after null check
    ---
     src/kits/interface/ColumnListView.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/kits/interface/ColumnListView.cpp b/src/kits/interface/ColumnListView.cpp
    index ce8237e4aa..3931618661 100644
    a b BColumnListView::SwapRows(int32 index1, int32 index2, BRow* parentRow1, 
    12921292    if (parentRow2 == NULL)
    12931293        container2 = fOutlineView->RowList();
    12941294    else
    1295         container2 = parentRow1->fChildList;
     1295        container2 = parentRow2->fChildList;
    12961296
    12971297    if (container2 == NULL)
    12981298        return false;