[haiku-commits] r43036 - haiku/trunk/src/apps/diskusage

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 31 Oct 2011 18:07:48 +0100 (CET)

Author: anevilyak
Date: 2011-10-31 18:07:47 +0100 (Mon, 31 Oct 2011)
New Revision: 43036
Changeset: https://dev.haiku-os.org/changeset/43036
Ticket: https://dev.haiku-os.org/ticket/8075

Modified:
   haiku/trunk/src/apps/diskusage/PieView.cpp
Log:
Apply patch by Olivier Coursiere that fixes #8075: the color index variable
wasn't constrained to the size of the color array, leading to an overflow +
crash when a large number of files were scanned. Thanks!



Modified: haiku/trunk/src/apps/diskusage/PieView.cpp
===================================================================
--- haiku/trunk/src/apps/diskusage/PieView.cpp  2011-10-31 15:42:56 UTC (rev 
43035)
+++ haiku/trunk/src/apps/diskusage/PieView.cpp  2011-10-31 17:07:47 UTC (rev 
43036)
@@ -443,7 +443,7 @@
        }
 
        if (info != NULL && info->color >= 0 && level == 0)
-               colorIdx = info->color;
+               colorIdx = info->color % kBasePieColorCount;
        else if (info != NULL)
                info->color = colorIdx;
 


Other related posts:

  • » [haiku-commits] r43036 - haiku/trunk/src/apps/diskusage - anevilyak