commit a9bfa6aa433a29fb144b1c7c22374aad53a1dd87
parent a8ecc3d599d92028882d80010cd1b582e061df44
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 5 Jun 2017 00:27:20 -0700
launch: Fix out-of-bounds memory access when opening devices
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/launch/launch.c b/launch/launch.c
@@ -223,7 +223,7 @@ handle_socket_data(int socket)
switch (request->type) {
case SWC_LAUNCH_REQUEST_OPEN_DEVICE:
- if (buffer[size] != '\0') {
+ if (buffer[size - 1] != '\0') {
fprintf(stderr, "path is not NULL terminated\n");
goto fail;
}