summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r--src/libirecovery.c2
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;