* commit '5e44f5cc0c2824827c9e87daff83e9722c549345': VectorImpl.cpp: fix benign multiplication overflow
This commit is contained in:
commit
6b86f3fe30
1 changed files with 4 additions and 1 deletions
|
|
@ -198,7 +198,10 @@ status_t VectorImpl::sort(VectorImpl::compar_r_t cmp, void* state)
|
||||||
_do_copy(next, curr, 1);
|
_do_copy(next, curr, 1);
|
||||||
next = curr;
|
next = curr;
|
||||||
--j;
|
--j;
|
||||||
curr = reinterpret_cast<char*>(array) + mItemSize*(j);
|
curr = NULL;
|
||||||
|
if (j >= 0) {
|
||||||
|
curr = reinterpret_cast<char*>(array) + mItemSize*(j);
|
||||||
|
}
|
||||||
} while (j>=0 && (cmp(curr, temp, state) > 0));
|
} while (j>=0 && (cmp(curr, temp, state) > 0));
|
||||||
|
|
||||||
_do_destroy(next, 1);
|
_do_destroy(next, 1);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue