summaryrefslogtreecommitdiff
path: root/libs/ui/SharedBufferStack.cpp
diff options
context:
space:
mode:
author Christopher Tate <ctate@android.com> 2009-09-10 16:08:47 -0700
committer Christopher Tate <ctate@android.com> 2009-09-10 16:08:47 -0700
commit5a8a1151e267b29978f219f9569fdfc5e74cc210 (patch)
tree82e9098547c12283278fb001a48788133a5285c1 /libs/ui/SharedBufferStack.cpp
parentbcbcaa7edd32ba67c6290d79f7e7821c4b5b39ac (diff)
Try not to crash the system server because of corrupt restore data
When we're about to allocate an array based on the restore data for purposes of unflattening a signature block, don't automatically assume that it's valid. If it's corrupt [and we've seen this in practice] we can wind up trying to allocate an array with 1.8 million objects, and throw an OutOfMemoryError, bringing down the system. This change arbitrarily decides that no package should have more than 20 signatures in its block, and aborts the restore if the metadata is thus revealed to be corrupt.
Diffstat (limited to 'libs/ui/SharedBufferStack.cpp')
0 files changed, 0 insertions, 0 deletions