[banshee] Safely access icon_names array.



commit 6daec9115e050d664aed11ced96e94bc60b862e5
Author: Eitan Isaacson <eitan monotonous org>
Date:   Fri Nov 13 11:43:03 2009 -0800

    Safely access icon_names array.
    
    Don't try access ColumnCellStatusIndicator.icon_names elements that
    are out of bounds.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=601756

 .../ColumnCellStatusIndicator.cs                   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
index 367abe3..61e4789 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/ColumnCellStatusIndicator.cs
@@ -157,7 +157,7 @@ namespace Banshee.Collection.Gui
 
             int icon_index = GetIconIndex (track);
 
-            if (icon_index < 0)
+            if ((icon_index < 0) || (icon_index >= icon_names.Length))
                 return "";
             else
                 return icon_names[GetIconIndex (track)];



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]