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: a05306cbd202b18ee268bbd7e49f1da75054ec9e
  1. Android.mk
  2. msm8084/
  3. msm8226/
  4. msm8960/
  5. msm8974/
  6. msm8994/