Commit c5c49b46 authored by jhawkins@chromium.org's avatar jhawkins@chromium.org

Coverity: Fix a sizeof mismatch.

It appears the sizeof change was to make the code more future proof:

sizeof(float) -> sizeof(audio_data[0])

However, audio_data[0] is a float*, not the intended float.  Adding the deref
to fix this.

CID_COUNT=1
CID=104561
BUG=none
R=scherkus


Review URL: https://chromiumcodereview.appspot.com/10832123

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149770 0039d316-1c4b-4281-b951-d872f2087c98
parent aa781138
...@@ -83,7 +83,7 @@ void RenderAudioSourceProvider::provideInput( ...@@ -83,7 +83,7 @@ void RenderAudioSourceProvider::provideInput(
} else { } else {
// Provide silence if the source is not running. // Provide silence if the source is not running.
for (size_t i = 0; i < audio_data.size(); ++i) for (size_t i = 0; i < audio_data.size(); ++i)
memset(audio_data[i], 0, sizeof(audio_data[0]) * number_of_frames); memset(audio_data[i], 0, sizeof(*audio_data[0]) * number_of_frames);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment