aboutsummaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-07 20:01:05 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-12-07 20:01:05 -0800
commit0fcdd011f5e26d637dbddc826206f4a4be820058 (patch)
tree975d16c82685dbf119d17d28e05ddb8b390a6663 /gtk-gui.c
parent407d4dd4aa50257bcf0b1dfba0474d372dbe09cd (diff)
downloadsubsurface-0fcdd011f5e26d637dbddc826206f4a4be820058.tar.gz
Fix off by one error
We increment i twice - which causes us to access memory past the end of the allocated array. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/gtk-gui.c b/gtk-gui.c
index 4836c98bc..7a4f108ad 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -1592,7 +1592,6 @@ static int fill_computer_list(GtkListStore *vendorstore, GtkListStore ***product
dcl = dcl->next;
}
/* now add the empty product list in case no vendor is selected */
- i++;
pstores[i] = gtk_list_store_new(1, G_TYPE_POINTER);
if (*product_index == -1)
*product_index = i;