summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar 怯花颜2021-10-24 01:35:05 +0200
committerGravatar Nikias Bassen2021-10-24 01:35:05 +0200
commit08a7c94569160eeb6f8e757c361d5e04a6492700 (patch)
treeedfb5de9883add321adff6b0225b0fc11138d8cd
parentb65c93bc6867480302f2e44186d74a64e8215c94 (diff)
downloadlibirecovery-08a7c94569160eeb6f8e757c361d5e04a6492700.tar.gz
libirecovery-08a7c94569160eeb6f8e757c361d5e04a6492700.tar.bz2
win32: SPDRP_DRIVER property has a 4-character suffix that is not necessarily an integer
-rw-r--r--src/libirecovery.c9
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) {