summaryrefslogtreecommitdiff
path: root/args.c
diff options
context:
space:
mode:
authorRalph Giles <giles@entropywave.com>2011-03-17 00:23:36 -0700
committerRalph Giles <giles@entropywave.com>2011-03-17 14:52:05 -0700
commit185557344ae79890d4acbbf5972972d20af1dd05 (patch)
treeb9d668e7ef18624c411593d1e8d9dc501411b04a /args.c
parentde5182eef387b2f681edc1a2b2b4519798fd0848 (diff)
downloadlibvpx-185557344ae79890d4acbbf5972972d20af1dd05.tar
libvpx-185557344ae79890d4acbbf5972972d20af1dd05.tar.gz
libvpx-185557344ae79890d4acbbf5972972d20af1dd05.tar.bz2
libvpx-185557344ae79890d4acbbf5972972d20af1dd05.zip
Set bounds from the array when iterating mmaps.
The mmap allocation code in vp8_dx_iface.c was inconsistent. The static array vp8_mem_req_segs defines two descriptors, but only the first is real. The second is a sentinel and isn't actually allocated, so vpx_codec_alg_priv is declared with mmaps[NELEMENTS(vp8_mem_req_segs)-1]. Some functions use this reduced upper bound when iterating though the mmap array, but these two functions did not. Instead, this commit calls NELEMENTS(...->mmaps) to directly query the bounds of the dereferenced array. This fixes an array-bounds warning from gcc 4.6 on vp8_xma_set_mmap. Change-Id: I918e2721b401d134c1a9764c978912bdb3188be1
Diffstat (limited to 'args.c')
0 files changed, 0 insertions, 0 deletions