summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Catanzaro <mcatanzaro@igalia.com>2018-03-05 12:45:17 -0600
committerMichael Catanzaro <mcatanzaro@igalia.com>2018-03-06 06:41:57 -0600
commit3a469a885e20765c41accd2788dbdb4b75658f8d (patch)
treebb88192afd9d6704672d51255ffe714eba189ba4
parent2f3c72f035c1c9dc02143f3b270815d29c4e22cd (diff)
downloadepiphany-3a469a885e20765c41accd2788dbdb4b75658f8d.tar.gz
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
-rw-r--r--lib/ephy-profile-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ephy-profile-utils.c b/lib/ephy-profile-utils.c
index 9bfd848c1..910dc7efd 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;