diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-28 15:38:28 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-28 15:38:38 +0200 |
commit | e641585834b3e917273f6e28fc7455ccf60f0e53 (patch) | |
tree | acf7e0335900e91acfb307e263ae2dbc8e639e2c | |
parent | holy crap, it actually kinda works now (diff) | |
download | cimple-e641585834b3e917273f6e28fc7455ccf60f0e53.tar.gz cimple-e641585834b3e917273f6e28fc7455ccf60f0e53.zip |
msg: fix a buffer overflow
Thanks, Valgrind!
Diffstat (limited to '')
-rw-r--r-- | src/msg.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -129,7 +129,7 @@ static int argv_unpack(struct msg *msg, const char *src) for (int i = 0; i < msg->argc; ++i) { size_t len = strlen(src); - msg->argv[i] = malloc(len); + msg->argv[i] = malloc(len + 1); if (!msg->argv[i]) { print_errno("malloc"); goto free; |