No description
eb0eb4f79f
1. When alloc or realloc failed in the function SharedBuffer::editResize, it would return a NULL pointer, then mStorage would update to be 1 by SharedBuffer::data() if no pointer check here, which is an obviously wrong address, and would cause corruption when used it e.g. in capacity(). So add the pointer check here for the return value of SharedBuffer::editResize, if it's NULL do not use it to update mStorage, to avoid the value of mStorage polluted. 2. when alloc or realloc falied in _grow & _shrink function, mStorage keep the original value, so mCount should not be updated here. Otherwise, mStorage might be 0 but mCount>0, so a corruption would happend when it try to delete items from the Vector since mCount>0. Change-Id: I7c3814e843c459834ca5eed392e8d63d1cb7d2d8 Signed-off-by: Shuo Gao <shuo.gao@intel.com> Signed-off-by: Jian Luo <jian.luo@intel.com> Signed-off-by: Bruce Beare <bruce.j.beare@intel.com> Signed-off-by: Jack Ren <jack.ren@intel.com> Author-tracking-BZ: 139626 |
||
---|---|---|
adb | ||
charger | ||
cpio | ||
debuggerd | ||
fastboot | ||
fastbootd | ||
fs_mgr | ||
gpttool | ||
healthd | ||
include | ||
init | ||
libbacktrace | ||
libcorkscrew | ||
libctest | ||
libcutils | ||
libdiskconfig | ||
libion | ||
liblinenoise | ||
liblog | ||
libmemtrack | ||
libmincrypt | ||
libnetutils | ||
libnl_2 | ||
libpixelflinger | ||
libsparse | ||
libsuspend | ||
libsync | ||
libsysutils | ||
libusbhost | ||
libutils | ||
libzipfile | ||
logcat | ||
logwrapper | ||
mkbootimg | ||
netcfg | ||
reboot | ||
rootdir | ||
run-as | ||
sdcard | ||
sh | ||
toolbox | ||
.gitignore | ||
Android.mk | ||
CleanSpec.mk | ||
MODULE_LICENSE_APACHE2 | ||
NOTICE | ||
README | ||
ThirdPartyProject.prop |
The system/ directory is intended for pieces of the world that are the core of the embedded linux platform at the heart of Android. These essential bits are required for basic booting, operation, and debugging. They should not depend on libraries outside of system/... (some of them do currently -- they need to be updated or changed) and they should not be required for the simulator build. The license for all these pieces should be clean (Apache2, BSD, or MIT). Currently system/bluetooth/... and system/extra/... have some pieces with GPL/LGPL licensed code. Assorted Issues: - pppd depends on libutils for logging - pppd depends on libcrypt/libcrypto - init, linker, debuggerd, toolbox, usbd depend on libcutils - should probably rename bionic to libc