commit a9bfa6a
Michael Forney
·
2017-06-05 07:27:20 +0000 UTC
parent a8ecc3d
launch: Fix out-of-bounds memory access when opening devices
1 files changed,
+1,
-1
+1,
-1
1@@ -223,7 +223,7 @@ handle_socket_data(int socket)
2
3 switch (request->type) {
4 case SWC_LAUNCH_REQUEST_OPEN_DEVICE:
5- if (buffer[size] != '\0') {
6+ if (buffer[size - 1] != '\0') {
7 fprintf(stderr, "path is not NULL terminated\n");
8 goto fail;
9 }