usb: usb_dc_native_posix_adapt: Check correct size
Fixes Coverity issues Fixes #20842 Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
parent
e4a9be94c0
commit
959b833f91
1 changed files with 2 additions and 2 deletions
|
@ -211,13 +211,13 @@ static void handle_usbip_submit(int connfd, struct usbip_header *hdr)
|
|||
|
||||
static void handle_usbip_unlink(int connfd, struct usbip_header *hdr)
|
||||
{
|
||||
struct usbip_unlink *req = &hdr->u.unlink;
|
||||
u64_t setup_padding;
|
||||
int read;
|
||||
|
||||
LOG_DBG("");
|
||||
|
||||
read = recv(connfd, req, sizeof(hdr->u), 0);
|
||||
/* Need to read the whole structure */
|
||||
read = recv(connfd, &hdr->u, sizeof(hdr->u), 0);
|
||||
if (read != sizeof(hdr->u)) {
|
||||
LOG_ERR("recv() failed: %s", strerror(errno));
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue