]> git.proxmox.com Git - mirror_qemu.git/commit
net: limit allocation in nc_sendv_compat
authorPeter Lieven <pl@kamp.de>
Thu, 30 Jun 2016 09:49:40 +0000 (11:49 +0200)
committerJason Wang <jasowang@redhat.com>
Tue, 27 Sep 2016 09:54:22 +0000 (17:54 +0800)
commit47f9f15831faa549504ab9b035aaea44a02e5f95
tree3beb277c083f7b88b669082268974e7e5afe6fc9
parent584613eacb3840c1803e665ed7edd4ac186deced
net: limit allocation in nc_sendv_compat

we only need to allocate enough memory to hold the packet. This might be
less than NET_BUFSIZE. Additionally fail early if the packet is larger
than NET_BUFSIZE.

Signed-off-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/net.c