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

Commit 66221ce8 authored by Patrick Auchter's avatar Patrick Auchter Committed by Harsh Sahu
Browse files

msm: mdss: fix possible overflow errors in panel_debug_base_reg_read



The panel_reg_buf is a dynamically allocated buffer of size reg_buf_len
so checking sizeof(panel_reg_buf) is incorrect.  Using scnprintf will
ensure that len is at most reg_buf_len - 1 after all the prints.  This
allows sanity checks to be removed which were incorrectly skipping
clock disable, resulting in an extra clock reference count.

Change-Id: Ic3bb685c7b83eefef7bc207ad93d6a2a9e36fd33
Signed-off-by: default avatarPatrick Auchter <auchter@motorola.com>
Signed-off-by: default avatarVeera Sundaram Sankaran <veeras@codeaurora.org>
(cherry picked from commit 89bede0751357bc24701b8ebfe326d3e6bb46683)
parent 0e5b6573
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment