diff options
author | Bastien Nocera | 2018-07-24 14:24:56 +0200 |
---|---|---|
committer | Bastien Nocera | 2018-07-24 14:36:27 +0200 |
commit | 6358b721c2f4dfea1d8f9f84346da30b458ec441 (patch) | |
tree | fa50c5fe97e1ac7910dab2569999a820c6ddf4cb | |
parent | 370a323148f691a5bb8f1d59b3c4aaf439f2d4b2 (diff) | |
download | libimobiledevice-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.
-rw-r--r-- | tools/idevicedebugserverproxy.c | 2 |
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; } } |