• Fix array overflow in AO concurrency handling · d72e2a19
    盏一 提交于
    In the function ao_foreach_extent_file() an array concurrency is used to
    store the concurrent levels, its size was AOTupleId_MaxSegmentFileNum,
    which equals to (MAX_AOREL_CONCURRENCY - 1).  However the possible index
    range is [0, MAX_AOREL_CONCURRENCY - 1], it exceeds the original size of
    the array, so an array overflow can happen at runtime.
    
    Fixed by correcting the array size, also define the size with
    MAX_AOREL_CONCURRENCY instead of AOTupleId_MaxSegmentFileNum.
    Reviewed-by: NZhenghua Lyu <zlv@pivotal.io>
    Reviewed-by: NNing Yu <nyu@pivotal.io>
    d72e2a19
aomd_filehandler.c 3.9 KB