Remove the enforce to build 32 binary am: d3fbe19e6b
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1329537 Change-Id: I75a3cacaf501dfd3e875de5511390235c5d7030c
This commit is contained in:
commit
98920599d9
6 changed files with 24 additions and 27 deletions
|
@ -12,8 +12,6 @@ cc_defaults {
|
||||||
"TypeConvert.cpp",
|
"TypeConvert.cpp",
|
||||||
],
|
],
|
||||||
|
|
||||||
compile_multilib: "32",
|
|
||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"android.hardware.cas@1.0",
|
"android.hardware.cas@1.0",
|
||||||
"android.hardware.cas.native@1.0",
|
"android.hardware.cas.native@1.0",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define LOG_TAG "android.hardware.cas@1.0-DescramblerImpl"
|
#define LOG_TAG "android.hardware.cas@1.0-DescramblerImpl"
|
||||||
|
|
||||||
#include <hidlmemory/mapping.h>
|
#include <hidlmemory/mapping.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <media/cas/DescramblerAPI.h>
|
#include <media/cas/DescramblerAPI.h>
|
||||||
#include <media/hardware/CryptoAPI.h>
|
#include <media/hardware/CryptoAPI.h>
|
||||||
#include <media/stagefright/foundation/AString.h>
|
#include <media/stagefright/foundation/AString.h>
|
||||||
|
@ -101,7 +102,7 @@ Return<void> DescramblerImpl::descramble(
|
||||||
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
||||||
// but the mapped memory's actual size will be smaller than the reported size.
|
// but the mapped memory's actual size will be smaller than the reported size.
|
||||||
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
||||||
ALOGE("Invalid hidl_memory size: %llu", srcBuffer.heapBase.size());
|
ALOGE("Invalid hidl_memory size: %" PRIu64 "", srcBuffer.heapBase.size());
|
||||||
android_errorWriteLog(0x534e4554, "79376389");
|
android_errorWriteLog(0x534e4554, "79376389");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -118,8 +119,8 @@ Return<void> DescramblerImpl::descramble(
|
||||||
}
|
}
|
||||||
if (!validateRangeForSize(
|
if (!validateRangeForSize(
|
||||||
srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize())) {
|
srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize())) {
|
||||||
ALOGE("Invalid src buffer range: offset %llu, size %llu, srcMem size %llu",
|
ALOGE("Invalid src buffer range: offset %" PRIu64 ", size %" PRIu64 ", srcMem"
|
||||||
srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize());
|
"size %" PRIu64 "", srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize());
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -135,8 +136,8 @@ Return<void> DescramblerImpl::descramble(
|
||||||
// is consistent with the source shared buffer size.
|
// is consistent with the source shared buffer size.
|
||||||
if (!validateRangeForSize(srcOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
if (!validateRangeForSize(srcOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
||||||
ALOGE("Invalid srcOffset and subsample size: "
|
ALOGE("Invalid srcOffset and subsample size: "
|
||||||
"srcOffset %llu, totalBytesInSubSamples %llu, srcBuffer size %llu",
|
"srcOffset %" PRIu64 ", totalBytesInSubSamples %" PRIu64 ", srcBuffer"
|
||||||
srcOffset, totalBytesInSubSamples, srcBuffer.size);
|
"size %" PRIu64 "", srcOffset, totalBytesInSubSamples, srcBuffer.size);
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -153,8 +154,8 @@ Return<void> DescramblerImpl::descramble(
|
||||||
// dstOffset against the buffer size too.
|
// dstOffset against the buffer size too.
|
||||||
if (!validateRangeForSize(dstOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
if (!validateRangeForSize(dstOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
||||||
ALOGE("Invalid dstOffset and subsample size: "
|
ALOGE("Invalid dstOffset and subsample size: "
|
||||||
"dstOffset %llu, totalBytesInSubSamples %llu, srcBuffer size %llu",
|
"dstOffset %" PRIu64 ", totalBytesInSubSamples %" PRIu64 ", srcBuffer"
|
||||||
dstOffset, totalBytesInSubSamples, srcBuffer.size);
|
"size %" PRIu64 "", dstOffset, totalBytesInSubSamples, srcBuffer.size);
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
|
|
@ -12,8 +12,6 @@ cc_defaults {
|
||||||
"TypeConvert.cpp",
|
"TypeConvert.cpp",
|
||||||
],
|
],
|
||||||
|
|
||||||
compile_multilib: "32",
|
|
||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"android.hardware.cas@1.0",
|
"android.hardware.cas@1.0",
|
||||||
"android.hardware.cas@1.1",
|
"android.hardware.cas@1.1",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define LOG_TAG "android.hardware.cas@1.1-DescramblerImpl"
|
#define LOG_TAG "android.hardware.cas@1.1-DescramblerImpl"
|
||||||
|
|
||||||
#include <hidlmemory/mapping.h>
|
#include <hidlmemory/mapping.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <media/cas/DescramblerAPI.h>
|
#include <media/cas/DescramblerAPI.h>
|
||||||
#include <media/hardware/CryptoAPI.h>
|
#include <media/hardware/CryptoAPI.h>
|
||||||
#include <media/stagefright/foundation/AUtils.h>
|
#include <media/stagefright/foundation/AUtils.h>
|
||||||
|
@ -92,7 +93,7 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
||||||
// but the mapped memory's actual size will be smaller than the reported size.
|
// but the mapped memory's actual size will be smaller than the reported size.
|
||||||
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
||||||
ALOGE("Invalid hidl_memory size: %llu", srcBuffer.heapBase.size());
|
ALOGE("Invalid hidl_memory size: %" PRIu64 "", srcBuffer.heapBase.size());
|
||||||
android_errorWriteLog(0x534e4554, "79376389");
|
android_errorWriteLog(0x534e4554, "79376389");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -108,8 +109,8 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
if (!validateRangeForSize(srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize())) {
|
if (!validateRangeForSize(srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize())) {
|
||||||
ALOGE("Invalid src buffer range: offset %llu, size %llu, srcMem size %llu",
|
ALOGE("Invalid src buffer range: offset %" PRIu64 ", size %" PRIu64 ", srcMem"
|
||||||
srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize());
|
"size %" PRIu64 "", srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize());
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -125,8 +126,8 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
// is consistent with the source shared buffer size.
|
// is consistent with the source shared buffer size.
|
||||||
if (!validateRangeForSize(srcOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
if (!validateRangeForSize(srcOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
||||||
ALOGE("Invalid srcOffset and subsample size: "
|
ALOGE("Invalid srcOffset and subsample size: "
|
||||||
"srcOffset %llu, totalBytesInSubSamples %llu, srcBuffer size %llu",
|
"srcOffset %" PRIu64 ", totalBytesInSubSamples %" PRIu64 ", srcBuffer"
|
||||||
srcOffset, totalBytesInSubSamples, srcBuffer.size);
|
"size %" PRIu64 "", srcOffset, totalBytesInSubSamples, srcBuffer.size);
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -143,8 +144,8 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
// dstOffset against the buffer size too.
|
// dstOffset against the buffer size too.
|
||||||
if (!validateRangeForSize(dstOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
if (!validateRangeForSize(dstOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
||||||
ALOGE("Invalid dstOffset and subsample size: "
|
ALOGE("Invalid dstOffset and subsample size: "
|
||||||
"dstOffset %llu, totalBytesInSubSamples %llu, srcBuffer size %llu",
|
"dstOffset %" PRIu64 ", totalBytesInSubSamples %" PRIu64 ", srcBuffer"
|
||||||
dstOffset, totalBytesInSubSamples, srcBuffer.size);
|
"size %" PRIu64 "", dstOffset, totalBytesInSubSamples, srcBuffer.size);
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
|
|
@ -12,8 +12,6 @@ cc_defaults {
|
||||||
"TypeConvert.cpp",
|
"TypeConvert.cpp",
|
||||||
],
|
],
|
||||||
|
|
||||||
compile_multilib: "32",
|
|
||||||
|
|
||||||
shared_libs: [
|
shared_libs: [
|
||||||
"android.hardware.cas@1.0",
|
"android.hardware.cas@1.0",
|
||||||
"android.hardware.cas@1.1",
|
"android.hardware.cas@1.1",
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#define LOG_TAG "android.hardware.cas@1.1-DescramblerImpl"
|
#define LOG_TAG "android.hardware.cas@1.1-DescramblerImpl"
|
||||||
|
|
||||||
#include <hidlmemory/mapping.h>
|
#include <hidlmemory/mapping.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <media/cas/DescramblerAPI.h>
|
#include <media/cas/DescramblerAPI.h>
|
||||||
#include <media/hardware/CryptoAPI.h>
|
#include <media/hardware/CryptoAPI.h>
|
||||||
#include <media/stagefright/foundation/AUtils.h>
|
#include <media/stagefright/foundation/AUtils.h>
|
||||||
|
@ -92,7 +93,7 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
// size in size_t. If size is over SIZE_MAX, mapMemory mapMemory could succeed
|
||||||
// but the mapped memory's actual size will be smaller than the reported size.
|
// but the mapped memory's actual size will be smaller than the reported size.
|
||||||
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
if (srcBuffer.heapBase.size() > SIZE_MAX) {
|
||||||
ALOGE("Invalid hidl_memory size: %llu", srcBuffer.heapBase.size());
|
ALOGE("Invalid hidl_memory size: %" PRIu64 "", srcBuffer.heapBase.size());
|
||||||
android_errorWriteLog(0x534e4554, "79376389");
|
android_errorWriteLog(0x534e4554, "79376389");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -108,8 +109,8 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
return Void();
|
return Void();
|
||||||
}
|
}
|
||||||
if (!validateRangeForSize(srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize())) {
|
if (!validateRangeForSize(srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize())) {
|
||||||
ALOGE("Invalid src buffer range: offset %llu, size %llu, srcMem size %llu",
|
ALOGE("Invalid src buffer range: offset %" PRIu64 ", size %" PRIu64 ", srcMem"
|
||||||
srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize());
|
"size %" PRIu64 "", srcBuffer.offset, srcBuffer.size, (uint64_t)srcMem->getSize());
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -125,8 +126,8 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
// is consistent with the source shared buffer size.
|
// is consistent with the source shared buffer size.
|
||||||
if (!validateRangeForSize(srcOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
if (!validateRangeForSize(srcOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
||||||
ALOGE("Invalid srcOffset and subsample size: "
|
ALOGE("Invalid srcOffset and subsample size: "
|
||||||
"srcOffset %llu, totalBytesInSubSamples %llu, srcBuffer size %llu",
|
"srcOffset %" PRIu64 ", totalBytesInSubSamples %" PRIu64 ", srcBuffer"
|
||||||
srcOffset, totalBytesInSubSamples, srcBuffer.size);
|
"size %" PRIu64 "", srcOffset, totalBytesInSubSamples, srcBuffer.size);
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
@ -143,8 +144,8 @@ Return<void> DescramblerImpl::descramble(ScramblingControl scramblingControl,
|
||||||
// dstOffset against the buffer size too.
|
// dstOffset against the buffer size too.
|
||||||
if (!validateRangeForSize(dstOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
if (!validateRangeForSize(dstOffset, totalBytesInSubSamples, srcBuffer.size)) {
|
||||||
ALOGE("Invalid dstOffset and subsample size: "
|
ALOGE("Invalid dstOffset and subsample size: "
|
||||||
"dstOffset %llu, totalBytesInSubSamples %llu, srcBuffer size %llu",
|
"dstOffset %" PRIu64 ", totalBytesInSubSamples %" PRIu64 ", srcBuffer"
|
||||||
dstOffset, totalBytesInSubSamples, srcBuffer.size);
|
"size %" PRIu64 "", dstOffset, totalBytesInSubSamples, srcBuffer.size);
|
||||||
android_errorWriteLog(0x534e4554, "67962232");
|
android_errorWriteLog(0x534e4554, "67962232");
|
||||||
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
_hidl_cb(toStatus(BAD_VALUE), 0, NULL);
|
||||||
return Void();
|
return Void();
|
||||||
|
|
Loading…
Reference in a new issue