AudioRecorder read buffer overflow
Since function was changed from byte-native to short-native,
it's no longer necessary to multiply offset by sizeof(short).
Bug 18367580
Change-Id: I669d860334ba40e46c04e534d7008b9e2401d8cd
diff --git a/core/jni/android_media_AudioRecord.cpp b/core/jni/android_media_AudioRecord.cpp
index e38f3d4..d2eb8dd 100644
--- a/core/jni/android_media_AudioRecord.cpp
+++ b/core/jni/android_media_AudioRecord.cpp
@@ -431,7 +431,7 @@
// read the new audio data from the native AudioRecord object
const size_t recorderBuffSize = lpRecorder->frameCount()*lpRecorder->frameSize();
const size_t sizeInBytes = sizeInShorts * sizeof(short);
- ssize_t readSize = lpRecorder->read(recordBuff + offsetInShorts * sizeof(short),
+ ssize_t readSize = lpRecorder->read(recordBuff + offsetInShorts,
sizeInBytes > recorderBuffSize ?
recorderBuffSize : sizeInBytes);