am 16f676f4: Merge change 6660 into donut

Merge commit '16f676f4f8ae3807b5cb40086048e48cae4be3cf'

* commit '16f676f4f8ae3807b5cb40086048e48cae4be3cf':
  Fix a small bug in array length bounds checking.
This commit is contained in:
Android (Google) Code Review
2009-07-09 14:12:48 -07:00
committed by The Android Open Source Project

View File

@@ -70,7 +70,7 @@ writeEntityData_native(JNIEnv* env, jobject clazz, int w, jbyteArray data, int s
int err;
BackupDataWriter* writer = (BackupDataWriter*)w;
if (env->GetArrayLength(data) > size) {
if (env->GetArrayLength(data) < size) {
// size mismatch
return -1;
}