mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
9cc346119b
Problem: [security]: stack-buffer-overflow in option callback functions
Solution: pass size of errbuf down the call stack, use snprintf()
instead of sprintf()
We pass the error buffer down to the option callback functions, but in
some parts of the code, we simply use sprintf(buf) to write into the error
buffer, which can overflow.
So let's pass down the length of the error buffer and use sprintf(buf, size)
instead.
Reported by @henices, thanks!
|
||
---|---|---|
.. | ||
testdir | ||
memfile_test.c |