[gnome-software] steam: Fix buffer-overrun spotted by valgrind



commit abbb3d78bbad8adbda1d2d93d2e6b22f5934a02e
Author: Richard Hughes <richard hughsie com>
Date:   Fri May 27 13:35:08 2016 +0100

    steam: Fix buffer-overrun spotted by valgrind

 src/plugins/gs-plugin-steam.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-steam.c b/src/plugins/gs-plugin-steam.c
index 4073ade..a6fcf4a 100644
--- a/src/plugins/gs-plugin-steam.c
+++ b/src/plugins/gs-plugin-steam.c
@@ -104,7 +104,7 @@ static void
 gs_plugin_steam_find_next_sync_point (guint8 *data, gsize data_len, guint *idx)
 {
        guint i;
-       for (i = *idx; i < data_len; i++) {
+       for (i = *idx; i < data_len - 9; i++) {
                if (memcmp (&data[i], "\0\x02\0common\0", 8) == 0) {
                        *idx = i - 1;
                        return;


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