summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Bastien Nocera2018-07-24 14:24:56 +0200
committerGravatar Bastien Nocera2018-07-24 14:36:27 +0200
commit6358b721c2f4dfea1d8f9f84346da30b458ec441 (patch)
treefa50c5fe97e1ac7910dab2569999a820c6ddf4cb /tools
parent370a323148f691a5bb8f1d59b3c4aaf439f2d4b2 (diff)
downloadlibimobiledevice-6358b721c2f4dfea1d8f9f84346da30b458ec441.tar.gz
libimobiledevice-6358b721c2f4dfea1d8f9f84346da30b458ec441.tar.bz2
idevicedebugserverproxy: Fix possible use-after-free
When creating a connection handler thread fails, and we close the server_fd, do not loop back to the start of the loop trying to run socket_accept() on a closed fd, but break out of the loop instead.
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicedebugserverproxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/idevicedebugserverproxy.c b/tools/idevicedebugserverproxy.c
index f270cdc..56b1013 100644
--- a/tools/idevicedebugserverproxy.c
+++ b/tools/idevicedebugserverproxy.c
@@ -364,7 +364,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Could not start connection handler.\n");
socket_shutdown(server_fd, SHUT_RDWR);
socket_close(server_fd);
- continue;
+ break;
}
}