diff options
| author | 2015-03-26 19:51:12 +0800 | |
|---|---|---|
| committer | 2015-04-10 11:59:52 +0530 | |
| commit | aef0445c6f1fbd818b594383217a13571bbd95ad (patch) | |
| tree | a57f207c94d8233a55d6e9262b8b42b9d5c9d88d /libs/binder/ProcessState.cpp | |
| parent | a60ff367a4f55ea319625cf500687c5025604f40 (diff) | |
Fix a memory corruption issue when vector resize
There is memory corruption in below code
const Rect* prev = &dst[prevIndex];
dst.add(Rect(prev->right, top, right, bottom));
prev points to a memory of vector dst, when dst resize in add()
call, the memory that prev points to will be copy to the new
allocated vector memory and the old memory will become undefined
Avoid pointer in this case, use a local copy instead
Change-Id: I4d95ceedd00c8fb615ac153082ade1b1ce0d0fa8
Diffstat (limited to 'libs/binder/ProcessState.cpp')
0 files changed, 0 insertions, 0 deletions