diff options
| author | Chandan Uddaraju <chandanu@codeaurora.org> | 2013-09-20 11:50:25 -0700 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:21:11 -0700 |
| commit | e374934345f0032e1e65b0aa13325dfd8d92079b (patch) | |
| tree | 01c2cc3e41999748795c553a43f18de8ccb86aec /drivers/video/fbdev/msm | |
| parent | a3e74efe224d292ae92fd6efd83e60d4f86f6089 (diff) | |
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: Chandan Uddaraju <chandanu@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev/msm')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_dsi_panel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dsi_panel.c b/drivers/video/fbdev/msm/mdss_dsi_panel.c index aab2eaad59d6..929bf7200ca6 100644 --- a/drivers/video/fbdev/msm/mdss_dsi_panel.c +++ b/drivers/video/fbdev/msm/mdss_dsi_panel.c @@ -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) { |
