pki: Check length of commands array before accessing command in --help
authorMartin Willi <martin@revosec.ch>
Tue, 11 Mar 2014 18:02:16 +0000 (19:02 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 19 Mar 2014 08:25:29 +0000 (09:25 +0100)
commit87e53819a6dd6c788fc74f4d9157a987766b6682
tree20a44c7e7bcb4a34626e9b9abd92ff9efa09df56
parentc489c5881a1d47a18ff47625deaf2bdf7245e5a0
pki: Check length of commands array before accessing command in --help

As --help is counted as command as well, the array is not null-terminated
and we have to check for MAX_COMMANDS.

Fixes #550.
src/pki/command.c