AudioFlinger: Clear effect_uuid_t in case of short read

Bug: 139417189
Test: native test, see bug
Change-Id: I9ef0e58e2e73089eb9a347d5357e040ac69bbdd1
gugelfrei
Andy Hung 5 years ago
parent 34bbfc447a
commit f85d129bf9

@ -1339,10 +1339,14 @@ status_t BnAudioFlinger::onTransact(
}
case GET_EFFECT_DESCRIPTOR: {
CHECK_INTERFACE(IAudioFlinger, data, reply);
effect_uuid_t uuid;
data.read(&uuid, sizeof(effect_uuid_t));
effect_uuid_t type;
data.read(&type, sizeof(effect_uuid_t));
effect_uuid_t uuid = {};
if (data.read(&uuid, sizeof(effect_uuid_t)) != NO_ERROR) {
android_errorWriteLog(0x534e4554, "139417189");
}
effect_uuid_t type = {};
if (data.read(&type, sizeof(effect_uuid_t)) != NO_ERROR) {
android_errorWriteLog(0x534e4554, "139417189");
}
uint32_t preferredTypeFlag = data.readUint32();
effect_descriptor_t desc = {};
status_t status = getEffectDescriptor(&uuid, &type, preferredTypeFlag, &desc);

Loading…
Cancel
Save