]> git.ozlabs.org Git - ppp.git/commit
pppd: Make sure word read from options file is null-terminated
authorPaul Mackerras <paulus@ozlabs.org>
Sun, 29 Dec 2019 22:32:18 +0000 (09:32 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Sun, 29 Dec 2019 22:32:18 +0000 (09:32 +1100)
commitc10c3c7cb3e779af5286430d5c9bb835a873ab32
tree498e6972cb1ccdead7ae6daf14ca7386dde44e91
parentb311e98b1d4775f7db36b81697ed8996809f3639
pppd: Make sure word read from options file is null-terminated

If a word read from an options file was longer than MAXWORDLEN,
we could pass it to option_error() without null termination,
which could have lead to an out-of-bounds access in vslprintf.
Make sure word[] is null terminated in all cases.

Reported-by: Florian Kohnhäuser <florian@kohnhaeuser.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pppd/options.c