hwc: Fix to avoid heap corruption

- Check for MAX_NUM_APP_LAYERS before updating yuv indices array.
- Fall back to GPU composition when number of app layers exceeds
  MAX_NUM_APP_LAYERS to avoid heap corruption.

Bug: 24163261

Acked-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>

Change-Id: Ieb91b705a0a5f50ce2f8829d1f1ee048d44b7d2e
5 files changed
tree: b827135cdc4fe56dc4580b02a0d90daa86203e48
  1. msm8084/
  2. msm8226/
  3. msm8960/
  4. msm8974/
  5. Android.mk