Fix array overflow in AO concurrency handling
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>
Showing
想要评论请 注册 或 登录