]> Sergey Matveev's repositories - nnn.git/commit
fix buffer overflow on certain platforms
authorNRK <nrk@disroot.org>
Tue, 21 Nov 2023 13:30:40 +0000 (19:30 +0600)
committerNRK <nrk@disroot.org>
Tue, 21 Nov 2023 13:32:00 +0000 (19:32 +0600)
commit3665541dac1479a83edae016aa1053ac7be162ba
tree5135ad2f68561b13d7c502e36f9a602b01397506
parent744a7554ef43b301355a6957ffd4c9e72a0cb076
fix buffer overflow on certain platforms

the size of g_buf depends on PATH_MAX and NAME_MAX which on certain
platforms (such as mac) might not be big enough to decode the help
string. use an explicit buffer with proper size instead.

Closes: https://github.com/jarun/nnn/issues/1768
src/nnn.c