minigbm: cros_gralloc/buffer: Initialize plane address array
Before we return to userspace, we should clear the output array of pointer values, so that it doesn't contain some spurious data. Furthermore, if zero flags are given, the lock method itself dereferences addr[0] before assigning any value there. BUG=b:38250067 TEST=android.media.cts.DecoderTest on veyron_minnie Change-Id: I58284477b3813265188f1714f00b1fb7003ed2a3 Reviewed-on: https://chromium-review.googlesource.com/592987 Commit-Ready: Tomasz Figa <tfiga@chromium.org> Tested-by: Tomasz Figa <tfiga@chromium.org> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
This commit is contained in:
parent
4b5d0bf2ab
commit
889b994fcd
1 changed files with 2 additions and 0 deletions
|
|
@ -46,6 +46,8 @@ int32_t cros_gralloc_buffer::decrease_refcount()
|
|||
|
||||
int32_t cros_gralloc_buffer::lock(uint64_t flags, uint8_t *addr[DRV_MAX_PLANES])
|
||||
{
|
||||
memset(addr, 0, DRV_MAX_PLANES * sizeof(*addr));
|
||||
|
||||
/*
|
||||
* Gralloc consumers don't support more than one kernel buffer per buffer object yet, so
|
||||
* just use the first kernel buffer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue