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

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

Merge "diag: dci: Prevent using uninitialized variables"

parents 1e353927 a80bcf76
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2082,6 +2082,11 @@ static int diag_process_dci_pkt_rsp(unsigned char *buf, int len)
	if ((ret == DIAG_DCI_NO_ERROR && !common_cmd) || ret < 0)
		return ret;

	reg_entry.cmd_code = 0;
	reg_entry.subsys_id = 0;
	reg_entry.cmd_code_hi = 0;
	reg_entry.cmd_code_lo = 0;

	if (header_len >= (sizeof(uint8_t)))
		reg_entry.cmd_code = header->cmd_code;
	if (header_len >= (2 * sizeof(uint8_t)))