multipath: fix max array size in print_cmd_valid
authorBenjamin Marzinski <bmarzins@redhat.com>
Tue, 9 Oct 2018 23:03:10 +0000 (18:03 -0500)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Wed, 10 Oct 2018 06:09:40 +0000 (08:09 +0200)
commitb25493d8fa13c2d7a346e0b18ad4756aa733ff8d
tree7b7ba4c7212fc595f0e4dfd3dfa4828d5d7911d6
parente034f5475d8fd9f214d67f70e2934f2c3c72c4f5
multipath: fix max array size in print_cmd_valid

The code is attempting to verify that 0 <= k < 3
However, sizeof(val) is 12, assuming 4 byte integers. The check needs to
take integer size into account. Found by coverity.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
multipath/main.c