From fc18810ba8755a4bc06c698c145c5b46f9ec4a51 Mon Sep 17 00:00:00 2001 From: jfreegman Date: Mon, 17 Jan 2022 17:56:47 -0500 Subject: [PATCH] Fix buffer overwrite in bootstrap config --- other/bootstrap_daemon/docker/tox-bootstrapd.sha256 | 2 +- other/bootstrap_daemon/src/config.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 index 3677c5ea..e70f12a7 100644 --- a/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 +++ b/other/bootstrap_daemon/docker/tox-bootstrapd.sha256 @@ -1 +1 @@ -8802a0afed0bcd3acaafebe22faf1f758935e3914d52472fc3e0c74e055fbc38 /usr/local/bin/tox-bootstrapd +edd2f14612df27c7211c2b0c87e714341c4cf4ada868741b2e7f73e1539f30e7 /usr/local/bin/tox-bootstrapd diff --git a/other/bootstrap_daemon/src/config.c b/other/bootstrap_daemon/src/config.c index a927a558..bad172c1 100644 --- a/other/bootstrap_daemon/src/config.c +++ b/other/bootstrap_daemon/src/config.c @@ -182,7 +182,7 @@ int get_general_config(const char *cfg_file_path, char **pid_file_path, char **k } const size_t keys_file_path_len = strlen(tmp_keys_file) + 1; - *keys_file_path = (char *)malloc(strlen(tmp_keys_file)); + *keys_file_path = (char *)malloc(keys_file_path_len); memcpy(*keys_file_path, tmp_keys_file, keys_file_path_len); // Get IPv6 option