block: validate amount of arguments for the "autofs" command
authorRafał Miłecki <rafal@milecki.pl>
Sun, 9 Dec 2018 13:22:17 +0000 (14:22 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Sun, 9 Dec 2018 13:22:17 +0000 (14:22 +0100)
commit30f509686d8abc2ffd7fe34401d00cf7a86d8ea9
treeeffe7c50e8be4d74e10aae554a5ef205a1546e3a
parentdc6a462997db36e860a97e49f2a3e5f4f4ac4d34
block: validate amount of arguments for the "autofs" command

Using argv[3] without checking argc value could result in undefined
behavior. It could result in a crash or accessing a NULL that separates
argv from envp on UNIX.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
block.c