Merge "hwc2: Fix NULL pointer dereference and out of bound access"