diff options
author | 2010-07-21 22:53:55 +0200 | |
---|---|---|
committer | 2010-07-21 22:53:55 +0200 | |
commit | 756bb5bd823d9b80521e11cf8d7a1ad62604cbce (patch) | |
tree | c77dea9226501865dcb73669d8eeeef135c6dc47 /src | |
parent | 419cc2bd828e6396cec719aff7c0a8752c0ab657 (diff) | |
download | libirecovery-756bb5bd823d9b80521e11cf8d7a1ad62604cbce.tar.gz libirecovery-756bb5bd823d9b80521e11cf8d7a1ad62604cbce.tar.bz2 |
Add check for correct transfer length of commands on sending
Diffstat (limited to 'src')
-rw-r--r-- | src/libirecovery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 4b8434f..80c11b3 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c @@ -258,7 +258,7 @@ static irecv_error_t irecv_send_command_raw(irecv_client_t client, unsigned char if (length > 0) { int ret = libusb_control_transfer(client->handle, 0x40, 0, 0, 0, command, length + 1, 100); - if (ret < 0) { + if ((ret < 0) || (ret != (length + 1))) { if (ret == LIBUSB_ERROR_PIPE) return IRECV_E_PIPE; |