diff options
| -rw-r--r-- | src/libirecovery.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c index 58a6620..3bcfbf2 100644 --- a/src/libirecovery.c +++ b/src/libirecovery.c | |||
| @@ -2207,7 +2207,14 @@ static void *_irecv_event_handler(void* data) | |||
| 2207 | free(details); | 2207 | free(details); |
| 2208 | continue; | 2208 | continue; |
| 2209 | } | 2209 | } |
| 2210 | uint32_t location = strtoul(p+1, NULL, 16); | 2210 | p++; |
| 2211 | uint32_t location = 0; | ||
| 2212 | if (!*p || strlen(p) < 4) { | ||
| 2213 | debug("%s: ERROR: Driver location suffix too short\n", __func__); | ||
| 2214 | free(details); | ||
| 2215 | continue; | ||
| 2216 | } | ||
| 2217 | memcpy(&location, p, 4); | ||
| 2211 | int found = 0; | 2218 | int found = 0; |
| 2212 | 2219 | ||
| 2213 | FOREACH(struct irecv_usb_device_info *devinfo, &devices) { | 2220 | FOREACH(struct irecv_usb_device_info *devinfo, &devices) { |
