mirror of
https://github.com/async-profiler/async-profiler.git
synced 2026-05-13 10:33:45 +00:00
Off-by-one bug
This commit is contained in:
@@ -110,7 +110,7 @@ Error Arguments::parse(const char* args) {
|
||||
|
||||
size_t len = strlen(args);
|
||||
free(_buf);
|
||||
_buf = (char*)malloc(len + EXTRA_BUF_SIZE);
|
||||
_buf = (char*)malloc(len + EXTRA_BUF_SIZE + 1);
|
||||
if (_buf == NULL) {
|
||||
return Error("Not enough memory to parse arguments");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user