diff options
author | Nikias Bassen | 2010-04-03 02:44:48 +0200 |
---|---|---|
committer | Hector Martin | 2010-04-08 15:11:49 +0200 |
commit | bcdac46984bea76ca5c47be55074d376a18b4a62 (patch) | |
tree | 8772e89175dd473b879f04cac63d914193e38738 | |
parent | ae85313617ef48b3b183b2077d4ffebde74ea101 (diff) | |
download | usbmuxd-bcdac46984bea76ca5c47be55074d376a18b4a62.tar.gz usbmuxd-bcdac46984bea76ca5c47be55074d376a18b4a62.tar.bz2 |
libusbmuxd: support shorter device info record messages
This adds support for older original usbmuxd implementations shipped
with iTunes.
-rw-r--r-- | libusbmuxd/libusbmuxd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libusbmuxd/libusbmuxd.c b/libusbmuxd/libusbmuxd.c index 9084457..9349ef4 100644 --- a/libusbmuxd/libusbmuxd.c +++ b/libusbmuxd/libusbmuxd.c @@ -353,7 +353,7 @@ int usbmuxd_get_device_list(usbmuxd_device_info_t **device_list) // receive device list while (1) { if (recv_buf_timeout(sfd, &hdr, sizeof(hdr), 0, 1000) == sizeof(hdr)) { - if (hdr.length != sizeof(hdr)+sizeof(dev_info)) { + if ((hdr.length < 48) || (hdr.length > sizeof(hdr)+sizeof(dev_info))) { // invalid packet size received! fprintf(stderr, "%s: Invalid packet size (%d) received when expecting a device info record.\n", |