net: properly handle illegal fd/vhostfd from command line
When hanlding fd/vhostfd form command line through net_handle_fd_param(),
we need to check mon and return value of strtol() otherwise we could
get segmentation fault or invalid fd when user type an illegal fd/vhostfd.
This patch is based on the suggestions from
Luiz Capitulino <[email protected]>.
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Luiz Capitulino <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
1 file changed