• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/av


Commit MetaInfo

Revisión8a9a159770047b354d8361d8f43655badafd3f37 (tree)
Tiempo2015-09-29 08:27:24
AutorWei Jia <wjia@goog...>
CommiterThe Android Automerger

Log Message

DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.

Bug: 23905951
Bug: 23912202
Change-Id: Id13a9d3cae2c09e7381b841e67ddfb188274d74c
(cherry picked from commit e995e477ad59b79145200c8f1e9e13c16c682d59)

Cambiar Resumen

Diferencia incremental

--- a/media/libmedia/IAudioFlinger.cpp
+++ b/media/libmedia/IAudioFlinger.cpp
@@ -1090,8 +1090,10 @@ status_t BnAudioFlinger::onTransact(
10901090 case OPEN_OUTPUT: {
10911091 CHECK_INTERFACE(IAudioFlinger, data, reply);
10921092 audio_module_handle_t module = (audio_module_handle_t)data.readInt32();
1093- audio_config_t config;
1094- data.read(&config, sizeof(audio_config_t));
1093+ audio_config_t config = {};
1094+ if (data.read(&config, sizeof(audio_config_t)) != NO_ERROR) {
1095+ ALOGE("b/23905951");
1096+ }
10951097 audio_devices_t devices = (audio_devices_t)data.readInt32();
10961098 String8 address(data.readString8());
10971099 audio_output_flags_t flags = (audio_output_flags_t) data.readInt32();
@@ -1135,8 +1137,10 @@ status_t BnAudioFlinger::onTransact(
11351137 CHECK_INTERFACE(IAudioFlinger, data, reply);
11361138 audio_module_handle_t module = (audio_module_handle_t)data.readInt32();
11371139 audio_io_handle_t input = (audio_io_handle_t)data.readInt32();
1138- audio_config_t config;
1139- data.read(&config, sizeof(audio_config_t));
1140+ audio_config_t config = {};
1141+ if (data.read(&config, sizeof(audio_config_t)) != NO_ERROR) {
1142+ ALOGE("b/23905951");
1143+ }
11401144 audio_devices_t device = (audio_devices_t)data.readInt32();
11411145 String8 address(data.readString8());
11421146 audio_source_t source = (audio_source_t)data.readInt32();
@@ -1241,8 +1245,10 @@ status_t BnAudioFlinger::onTransact(
12411245 }
12421246 case CREATE_EFFECT: {
12431247 CHECK_INTERFACE(IAudioFlinger, data, reply);
1244- effect_descriptor_t desc;
1245- data.read(&desc, sizeof(effect_descriptor_t));
1248+ effect_descriptor_t desc = {};
1249+ if (data.read(&desc, sizeof(effect_descriptor_t)) != NO_ERROR) {
1250+ ALOGE("b/23905951");
1251+ }
12461252 sp<IEffectClient> client = interface_cast<IEffectClient>(data.readStrongBinder());
12471253 int32_t priority = data.readInt32();
12481254 audio_io_handle_t output = (audio_io_handle_t) data.readInt32();
@@ -1318,8 +1324,10 @@ status_t BnAudioFlinger::onTransact(
13181324 } break;
13191325 case GET_AUDIO_PORT: {
13201326 CHECK_INTERFACE(IAudioFlinger, data, reply);
1321- struct audio_port port;
1322- data.read(&port, sizeof(struct audio_port));
1327+ struct audio_port port = {};
1328+ if (data.read(&port, sizeof(struct audio_port)) != NO_ERROR) {
1329+ ALOGE("b/23905951");
1330+ }
13231331 status_t status = getAudioPort(&port);
13241332 reply->writeInt32(status);
13251333 if (status == NO_ERROR) {
@@ -1331,8 +1339,10 @@ status_t BnAudioFlinger::onTransact(
13311339 CHECK_INTERFACE(IAudioFlinger, data, reply);
13321340 struct audio_patch patch;
13331341 data.read(&patch, sizeof(struct audio_patch));
1334- audio_patch_handle_t handle;
1335- data.read(&handle, sizeof(audio_patch_handle_t));
1342+ audio_patch_handle_t handle = {};
1343+ if (data.read(&handle, sizeof(audio_patch_handle_t)) != NO_ERROR) {
1344+ ALOGE("b/23905951");
1345+ }
13361346 status_t status = createAudioPatch(&patch, &handle);
13371347 reply->writeInt32(status);
13381348 if (status == NO_ERROR) {
--- a/media/libmedia/IAudioPolicyService.cpp
+++ b/media/libmedia/IAudioPolicyService.cpp
@@ -1085,8 +1085,10 @@ status_t BnAudioPolicyService::onTransact(
10851085
10861086 case GET_AUDIO_PORT: {
10871087 CHECK_INTERFACE(IAudioPolicyService, data, reply);
1088- struct audio_port port;
1089- data.read(&port, sizeof(struct audio_port));
1088+ struct audio_port port = {};
1089+ if (data.read(&port, sizeof(struct audio_port)) != NO_ERROR) {
1090+ ALOGE("b/23912202");
1091+ }
10901092 status_t status = getAudioPort(&port);
10911093 reply->writeInt32(status);
10921094 if (status == NO_ERROR) {
@@ -1099,8 +1101,10 @@ status_t BnAudioPolicyService::onTransact(
10991101 CHECK_INTERFACE(IAudioPolicyService, data, reply);
11001102 struct audio_patch patch;
11011103 data.read(&patch, sizeof(struct audio_patch));
1102- audio_patch_handle_t handle;
1103- data.read(&handle, sizeof(audio_patch_handle_t));
1104+ audio_patch_handle_t handle = {};
1105+ if (data.read(&handle, sizeof(audio_patch_handle_t)) != NO_ERROR) {
1106+ ALOGE("b/23912202");
1107+ }
11041108 status_t status = createAudioPatch(&patch, &handle);
11051109 reply->writeInt32(status);
11061110 if (status == NO_ERROR) {