mirror of
https://github.com/neovim/neovim.git
synced 2024-12-29 14:41:06 -07:00
log.c: Fix possible truncation in buffer (#8791)
This commit is contained in:
parent
8951304c10
commit
bb33fc4f55
@ -198,7 +198,7 @@ void log_callstack_to_file(FILE *log_file, const char *const func_name,
|
||||
}
|
||||
assert(24 + exepathlen < IOSIZE); // Must fit in `cmdbuf` below.
|
||||
|
||||
char cmdbuf[IOSIZE + (20 * ARRAY_SIZE(trace))];
|
||||
char cmdbuf[IOSIZE + (20 * ARRAY_SIZE(trace)) + MAXPATHL];
|
||||
snprintf(cmdbuf, sizeof(cmdbuf), "addr2line -e %s -f -p", exepath);
|
||||
for (int i = 1; i < trace_size; i++) {
|
||||
char buf[20]; // 64-bit pointer 0xNNNNNNNNNNNNNNNN with leading space.
|
||||
|
Loading…
Reference in New Issue
Block a user