summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MP3Extractor.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-11 13:30:08 -0800
committerAndreas Huber <andih@google.com>2010-01-11 13:30:08 -0800
commitdb74495dbf653a72018396607fae63946bed44ec (patch)
treeb8f48bc8070b92dbe52d96a85113e31b1ec09edc /media/libstagefright/MP3Extractor.cpp
parent67e5a4f6f6879d512a859e5dba92e9beec7a2f91 (diff)
downloadframeworks_av-db74495dbf653a72018396607fae63946bed44ec.zip
frameworks_av-db74495dbf653a72018396607fae63946bed44ec.tar.gz
frameworks_av-db74495dbf653a72018396607fae63946bed44ec.tar.bz2
Fix an uninitialized read detected by valgrind. The array to be copied is statically sized and not a c-string.
related-to-bug: 2366619
Diffstat (limited to 'media/libstagefright/MP3Extractor.cpp')
-rw-r--r--media/libstagefright/MP3Extractor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libstagefright/MP3Extractor.cpp b/media/libstagefright/MP3Extractor.cpp
index 14e6177..b8e76fd 100644
--- a/media/libstagefright/MP3Extractor.cpp
+++ b/media/libstagefright/MP3Extractor.cpp
@@ -557,7 +557,7 @@ MP3Source::MP3Source(
mStarted(false),
mByteNumber(byte_number),
mGroup(NULL) {
- memcpy (mTableOfContents, table_of_contents, strlen(table_of_contents));
+ memcpy (mTableOfContents, table_of_contents, sizeof(mTableOfContents));
}
MP3Source::~MP3Source() {