[epiphany/gnome-3-28] profile-utils: Fix off-by-two buffer overflow



commit 3a469a885e20765c41accd2788dbdb4b75658f8d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Mon Mar 5 12:45:17 2018 -0600

    profile-utils: Fix off-by-two buffer overflow
    
    Ubuntu gets bonus points for discovering this by running our tests.
    
    I'm used to seeing off-by-one errors. Off by two is more unusual, but
    that's what we have here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794056

 lib/ephy-profile-utils.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index 9bfd848..910dc7e 100644
--- a/lib/ephy-profile-utils.c
+++ b/lib/ephy-profile-utils.c
@@ -103,7 +103,7 @@ ephy_profile_utils_do_migration (const char *profile_directory, int test_to_run,
   GError *error = NULL;
   char *index = NULL, *version = NULL;
   int status;
-  const char *argv[6] = { PKGLIBEXECDIR "/" EPHY_PROFILE_MIGRATOR, "-v" };
+  const char *argv[8] = { PKGLIBEXECDIR "/" EPHY_PROFILE_MIGRATOR, "-v" };
   int i = 2; /* index for argv, start filling at 2. */
   char **envp;
 


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