[Easytag-mailing] [PULL REQUEST 2/2] Fix crash in misc.c due to array index out of bounds



See the original bugs in Ubuntu and Debian:

https://bugs.launchpad.net/bugs/907806
http://bugs.debian.org/669290

Git branch: https://github.com/Sikon/easytag/tree/fix-out-of-bound

Attached are the same changes as a patch file.
Description: fix out of bound array access
 The list has 15 columns
Author: Julian Taylor <jtaylor ubuntu com>
Forwarded: easytag-mailing lists sourceforge net
Bug-Ubuntu: https://bugs.launchpad.net/bugs/907806
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669290
---
--- easytag-2.1.7.orig/src/misc.c
+++ easytag-2.1.7/src/misc.c
@@ -2462,16 +2462,18 @@ void Search_File (GtkWidget *search_butt
 
 void Add_Row_To_Search_Result_List(ET_File *ETFile,const gchar *string_to_search)
 {
-    gchar *SearchResultList_Text[14]; // Because : 14 columns to display
-    gint SearchResultList_Weight[14] = {PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
+    gchar *SearchResultList_Text[15]; // Because : 15 columns to display
+    gint SearchResultList_Weight[15] = {PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
                                         PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
                                         PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
                                         PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
                                         PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
                                         PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
-                                        PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL};
-    GdkColor *SearchResultList_Color[14] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-                                            NULL, NULL, NULL, NULL, NULL, NULL, NULL};
+                                        PANGO_WEIGHT_NORMAL, PANGO_WEIGHT_NORMAL,
+                                        PANGO_WEIGHT_NORMAL};
+    GdkColor *SearchResultList_Color[15] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                            NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                            NULL};
     gchar *track, *track_total;
     gboolean case_sensitive;
     gint column;


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