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 <lcapitulino@redhat.com>. Signed-off-by: NJason Wang <jasowang@redhat.com> Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
Showing
想要评论请 注册 或 登录