[gnome-software/gnome-3-22] packagekit: Fix refining update details



commit d25a905ab09ced5084f1f857b0f933627c07b251
Author: Kalev Lember <klember redhat com>
Date:   Thu Dec 15 09:36:01 2016 +0100

    packagekit: Fix refining update details
    
    This makes the update notes correctly show up on the updates page again.
    
    Note that this wasn't doing an array out of bounds write, even though it
    looks like that at first glance: the memory allocated for the array was
    always one element larger to accomodate the trailing nul and only this
    got overwritten.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775884

 src/plugins/gs-plugin-packagekit-refine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-packagekit-refine.c b/src/plugins/gs-plugin-packagekit-refine.c
index 0c709bc..c2e3c5a 100644
--- a/src/plugins/gs-plugin-packagekit-refine.c
+++ b/src/plugins/gs-plugin-packagekit-refine.c
@@ -380,7 +380,7 @@ gs_plugin_packagekit_refine_updatedetails (GsPlugin *plugin,
        for (i = 0; i < gs_app_list_length (list); i++) {
                app = gs_app_list_index (list, i);
                package_id = gs_app_get_source_id_default (app);
-               package_ids[i++] = package_id;
+               package_ids[i] = package_id;
        }
 
        data.app = NULL;


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