replicant-frameworks_native/libs
Nick Kralevich b6b1423c87 Parcel.cpp: reject size_t arguments greater than INT32_MAX
It's a security best practice for size_t values to be rejected if
they are greater than INT32_SIZE. This is intended to prevent the
common error of inadvertently passing a negative int value to a
function, which after conversion to an unsigned type, becomes a huge
number, defeating the purpose of bounds checking.

This patch also addresses a bug where the call to:
  Parcel::write(buf, (size_t) -1);
would call writeInPlace() which uses PAD_SIZE on the supplied
argument. This would then cause an integer overflow, with PAD_SIZE
returning a small value, but the memcpy in Parcel::write using the
old large length value.

Bug: 19573085
Change-Id: Ib11bfb3dae4f3be91cd17b2c676926700972c7b8
2015-04-02 10:56:12 -07:00
..
binder Parcel.cpp: reject size_t arguments greater than INT32_MAX 2015-04-02 10:56:12 -07:00
diskusage Add missing <unistd.h> include for close. 2015-02-19 16:58:44 -08:00
gui Support restricted mode in SensorService. 2015-03-24 15:41:35 -07:00
input am 4355c0c9: am e1e3d278: Merge "Clean cruft out of makefiles." 2014-09-12 19:28:17 +00:00
ui Add dataSpace to buffer queues; remove old format enums. 2015-03-04 11:58:52 -08:00