mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +00:00
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>
This commit is contained in:
parent
407d4dd4aa
commit
0fcdd011f5
1 changed files with 0 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue