From f6df6995b6b4a58f3fa5c6b8c8853ad4c38628df Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 31 Oct 2011 17:07:47 +0000 Subject: [PATCH] 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! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43036 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/diskusage/PieView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/diskusage/PieView.cpp b/src/apps/diskusage/PieView.cpp index 57908a385b..e3ec4e637e 100644 --- a/src/apps/diskusage/PieView.cpp +++ b/src/apps/diskusage/PieView.cpp @@ -443,7 +443,7 @@ PieView::_DrawDirectory(BRect b, FileInfo* info, float parentSpan, } if (info != NULL && info->color >= 0 && level == 0) - colorIdx = info->color; + colorIdx = info->color % kBasePieColorCount; else if (info != NULL) info->color = colorIdx;