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

Commit f0f2391d authored by Chandan Uddaraju's avatar Chandan Uddaraju Committed by Gerrit - the friendly Code Review server
Browse files

mdss: display: Fix DCS command parsing for short commands



The DCS short command might have zero payload. Fix the
command size check for zero payload.

Change-Id: Idb5220c90bd7ee52bfa2e049861dda131785bbee
CRs-Fixed: 547774
Signed-off-by: default avatarChandan Uddaraju <chandanu@codeaurora.org>
parent def6c024
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ static int mdss_dsi_parse_dcs_cmds(struct device_node *np,
	bp = buf;
	len = blen;
	cnt = 0;
	while (len > sizeof(*dchdr)) {
	while (len >= sizeof(*dchdr)) {
		dchdr = (struct dsi_ctrl_hdr *)bp;
		dchdr->dlen = ntohs(dchdr->dlen);
		if (dchdr->dlen > len) {