Merge "disp: msm: fix out-of-bound access and NULL dereference"

This commit is contained in:
qctecmdr
2019-05-19 16:45:53 -07:00
zatwierdzone przez Gerrit - the friendly Code Review server
5 zmienionych plików z 33 dodań i 15 usunięć

Wyświetl plik

@@ -1399,7 +1399,8 @@ static int _sde_encoder_dsc_2_lm_2_enc_2_intf(struct sde_encoder_virt *sde_enc,
SDE_DEBUG_ENC(sde_enc, "pic_w: %d pic_h: %d mode:%d\n",
roi->w, roi->h, dsc_common_mode);
for (i = 0; i < sde_enc->num_phys_encs; i++) {
for (i = 0; i < sde_enc->num_phys_encs &&
i < MAX_CHANNELS_PER_ENC; i++) {
bool active = !!((1 << i) & params->affected_displays);
SDE_EVT32(DRMID(&sde_enc->base), roi->w, roi->h,