lichray / nvi2

A multibyte fork of the nvi editor for BSD
Other
144 stars 34 forks source link

Fix buffer overflow in `ex_comm_search` #97

Closed ueXIMcWizBrdyVEciAlSwxP8aaXP70mO closed 3 years ago

ueXIMcWizBrdyVEciAlSwxP8aaXP70mO commented 3 years ago

Platform: NixOS 20.09 Kernel: Linux 5.4.108 (x86_64-linux, glibc 2.31)

This PR fixes a buffer overflow in ex_comm_search. The overflow was found using AddressSanitizer, for which a build flag was added in CMakeLists.txt. I did not run into the linker error described by #92 both with and without widechar support, but this may be due to a difference in systems.

lichray commented 3 years ago

Thanks for the contribution!