Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b6d359a6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Fix out of bounds memory access"

parents ae6093ed 14038bca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ static int cntl_socket_process_msg_server(uint32_t cmd, uint32_t svc_id,
	uint8_t found = 0;
	struct diag_socket_info *info = NULL;

	for (peripheral = 0; peripheral <= NUM_PERIPHERALS; peripheral++) {
	for (peripheral = 0; peripheral < NUM_PERIPHERALS; peripheral++) {
		info = &socket_cmd[peripheral];
		if ((svc_id == info->svc_id) &&
		    (ins_id == info->ins_id)) {
@@ -531,7 +531,7 @@ static int cntl_socket_process_msg_client(uint32_t cmd, uint32_t node_id,
	struct diag_socket_info *info = NULL;
	struct msm_ipc_port_addr remote_port = {0};

	for (peripheral = 0; peripheral <= NUM_PERIPHERALS; peripheral++) {
	for (peripheral = 0; peripheral < NUM_PERIPHERALS; peripheral++) {
		info = &socket_data[peripheral];
		remote_port = info->remote_addr.address.addr.port_addr;
		if ((remote_port.node_id == node_id) &&