diff options
| author | 2014-01-09 09:38:19 +0100 | |
|---|---|---|
| committer | 2014-01-09 09:38:19 +0100 | |
| commit | 37f8ba3c2bdfe54c50d4f7f7f396c38c63a354be (patch) | |
| tree | 3ef833545509e94ad8c2e77aa5f765f192f7fa47 /src | |
| parent | b9bc19376effea619c2455cb8d3fbe4ca6685c5d (diff) | |
| download | usbmuxd-37f8ba3c2bdfe54c50d4f7f7f396c38c63a354be.tar.gz usbmuxd-37f8ba3c2bdfe54c50d4f7f7f396c38c63a354be.tar.bz2 | |
client: fix 64-bit crash in process_send due to signed/unsigned foo
Diffstat (limited to 'src')
| -rw-r--r-- | src/client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.c b/src/client.c index ed383b7..d4719c3 100644 --- a/src/client.c +++ b/src/client.c | |||
| @@ -599,7 +599,7 @@ static int client_command(struct mux_client *client, struct usbmuxd_header *hdr) | |||
| 599 | 599 | ||
| 600 | static void process_send(struct mux_client *client) | 600 | static void process_send(struct mux_client *client) |
| 601 | { | 601 | { |
| 602 | uint32_t res; | 602 | int res; |
| 603 | if(!client->ob_size) { | 603 | if(!client->ob_size) { |
| 604 | usbmuxd_log(LL_WARNING, "Client %d OUT process but nothing to send?", client->fd); | 604 | usbmuxd_log(LL_WARNING, "Client %d OUT process but nothing to send?", client->fd); |
| 605 | client->events &= ~POLLOUT; | 605 | client->events &= ~POLLOUT; |
| @@ -611,7 +611,7 @@ static void process_send(struct mux_client *client) | |||
| 611 | client_close(client); | 611 | client_close(client); |
| 612 | return; | 612 | return; |
| 613 | } | 613 | } |
| 614 | if(res == client->ob_size) { | 614 | if((uint32_t)res == client->ob_size) { |
| 615 | client->ob_size = 0; | 615 | client->ob_size = 0; |
| 616 | client->events &= ~POLLOUT; | 616 | client->events &= ~POLLOUT; |
| 617 | if(client->state == CLIENT_CONNECTING2) { | 617 | if(client->state == CLIENT_CONNECTING2) { |
