* commit 'd61dbb36a673a8278eb7d63e53215b2cff804f4b': Fix heap data leak vulnerability
This commit is contained in:
@@ -741,9 +741,11 @@ status_t BpDrmManagerService::decrypt(
|
|||||||
const status_t status = reply.readInt32();
|
const status_t status = reply.readInt32();
|
||||||
ALOGV("Return value of decrypt() is %d", status);
|
ALOGV("Return value of decrypt() is %d", status);
|
||||||
|
|
||||||
|
if (status == NO_ERROR) {
|
||||||
const int size = reply.readInt32();
|
const int size = reply.readInt32();
|
||||||
(*decBuffer)->length = size;
|
(*decBuffer)->length = size;
|
||||||
reply.read((void *)(*decBuffer)->data, size);
|
reply.read((void *)(*decBuffer)->data, size);
|
||||||
|
}
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -1438,9 +1440,11 @@ status_t BnDrmManagerService::onTransact(
|
|||||||
|
|
||||||
reply->writeInt32(status);
|
reply->writeInt32(status);
|
||||||
|
|
||||||
|
if (status == NO_ERROR) {
|
||||||
const int size = decBuffer->length;
|
const int size = decBuffer->length;
|
||||||
reply->writeInt32(size);
|
reply->writeInt32(size);
|
||||||
reply->write(decBuffer->data, size);
|
reply->write(decBuffer->data, size);
|
||||||
|
}
|
||||||
|
|
||||||
clearDecryptHandle(&handle);
|
clearDecryptHandle(&handle);
|
||||||
delete encBuffer; encBuffer = NULL;
|
delete encBuffer; encBuffer = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user