am 68f591b1: Merge change 24607 into eclair
Merge commit '68f591b17537cb437ca0b25d00a6d3d08e507abb' into eclair-plus-aosp * commit '68f591b17537cb437ca0b25d00a6d3d08e507abb': Try not to crash the system server because of corrupt restore data
This commit is contained in:
@@ -327,6 +327,13 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
try {
|
try {
|
||||||
int num = in.readInt();
|
int num = in.readInt();
|
||||||
Log.v(TAG, " ... unflatten read " + num);
|
Log.v(TAG, " ... unflatten read " + num);
|
||||||
|
|
||||||
|
// Sensical?
|
||||||
|
if (num > 20) {
|
||||||
|
Log.e(TAG, "Suspiciously large sig count in restore data; aborting");
|
||||||
|
throw new IllegalStateException("Bad restore state");
|
||||||
|
}
|
||||||
|
|
||||||
sigs = new Signature[num];
|
sigs = new Signature[num];
|
||||||
for (int i = 0; i < num; i++) {
|
for (int i = 0; i < num; i++) {
|
||||||
int len = in.readInt();
|
int len = in.readInt();
|
||||||
|
|||||||
Reference in New Issue
Block a user