Skip to content
Snippets Groups Projects
Commit f7c31d63 authored by Jason Wang's avatar Jason Wang Committed by Michael S. Tsirkin
Browse files

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: default avatarJason Wang <jasowang@redhat.com>
Reviewed-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 258dc7c9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment