]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Ensure option array p[] is always NULL-terminated
authorGuido Vranken <guidovranken@gmail.com>
Wed, 7 Jun 2017 23:02:38 +0000 (01:02 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 12 Jun 2017 13:10:29 +0000 (15:10 +0200)
commit8b03d3d9307b407b0da98ebefb052b1fa87aefe7
tree503a7d0bb49abc613c817620209e94fcae817542
parent2dca268a643d4cfe375ef46950b57ef660073711
Ensure option array p[] is always NULL-terminated

Add one element (a terminating NULL pointer) to the array into
which parse_line() stores the arguments. This prevents that options
that traverse this array until a terminator is seen (for instance
options that call no_more_than_n_args) will peek beyond buffer bounds.
In the worst case this might lead to a crash (stack overflow, not
likely in practice).

Signed-off-by: Guido Vranken <guidovranken@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <CAO5O-EKCLjPpdKUH6cCoqoZDAfekSafpc7Ga55H2_5Hs4rBopg@mail.gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg14757.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/options.c