Go to file
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
build Increase growth limit from 64m to 80m for 1024mb hdpi tablet 2014-12-11 13:40:37 -08:00
cmds am 059e9c02: am 8c60cec0: am 5881c8dd: Merge "Installd: Support dex2oat threads system property" 2015-03-31 03:43:53 +00:00
data/etc Add Package Manager feature to enable MIDI support 2015-03-27 13:21:56 -07:00
include Build error SensorManager. 2015-03-26 16:06:06 -07:00
libs Parcel.cpp: reject size_t arguments greater than INT32_MAX 2015-04-02 10:56:12 -07:00
opengl am 5e44f932: am b6b81d6a: Merge "[MIPS] Fix mips32r1 build" 2015-03-15 22:34:00 +00:00
services Merge "Stub implementations of HAL usage callbacks." 2015-03-31 20:22:44 +00:00
MODULE_LICENSE_APACHE2 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
NOTICE resolved conflicts for merge of adee6b35 to honeycomb-plus-aosp 2011-01-17 14:17:12 -08:00