diff options
author | shinyquagsire23 <mtinc2@gmail.com> | 2021-11-05 19:51:59 -0700 |
---|---|---|
committer | shinyquagsire23 <mtinc2@gmail.com> | 2021-11-05 19:51:59 -0700 |
commit | b142ac6e487b514eb8c58372c0a12d38a30c958f (patch) | |
tree | 821e068287a8c01d72549d9ffaa6dbc945ab4046 | |
parent | 05ded46ab7f556956a2eee2411a8d2968b7e8ad6 (diff) |
Fix stack corruption off-by-one in mwasmarm_patcher which triggered stack cookie checks on ARM64 MacOS
-rw-r--r-- | tools/mwasmarm_patcher/mwasmarm_patcher.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/mwasmarm_patcher/mwasmarm_patcher.c b/tools/mwasmarm_patcher/mwasmarm_patcher.c index e5ad3272..18572204 100644 --- a/tools/mwasmarm_patcher/mwasmarm_patcher.c +++ b/tools/mwasmarm_patcher/mwasmarm_patcher.c @@ -224,7 +224,7 @@ int main(int argc, char *argv[]) { }
free(string);
- char buf[SHA_DIGEST_LENGTH*2];
+ char buf[(SHA_DIGEST_LENGTH*2)+1];
for (int i=0; i < SHA_DIGEST_LENGTH; i++) {
sprintf(&(buf[i*2]), "%02x", sha1[i]);
}
|