diff options
author | Wei Jia <wjia@google.com> | 2015-08-04 18:49:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-04 18:49:10 +0000 |
commit | fbf1c8d65fe257847b35ec7289f9450ac34c8034 (patch) | |
tree | ed904b9e653f4a4e71fdf90683d978637d180a72 /media | |
parent | 87499eb45a7275058b5c3cd8e07171393032db8f (diff) | |
parent | 660620d43898b09126f54a7ca27ca34b011f4726 (diff) | |
download | frameworks_av-fbf1c8d65fe257847b35ec7289f9450ac34c8034.zip frameworks_av-fbf1c8d65fe257847b35ec7289f9450ac34c8034.tar.gz frameworks_av-fbf1c8d65fe257847b35ec7289f9450ac34c8034.tar.bz2 |
am 660620d4: am d8bb17e3: am 42bd61d7: am d9a9a324: am 10ef7f75: am b0924c63: am 7af634e1: am 8ec119d2: am d138024f: am b32957db: am a9d7c917: am a99d3d83: am 738a753a: SampleTable: fix integer overflow checks.
* commit '660620d43898b09126f54a7ca27ca34b011f4726':
SampleTable: fix integer overflow checks.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/SampleTable.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/media/libstagefright/SampleTable.cpp b/media/libstagefright/SampleTable.cpp index 6030236..0c7cba4 100644 --- a/media/libstagefright/SampleTable.cpp +++ b/media/libstagefright/SampleTable.cpp @@ -333,7 +333,7 @@ status_t SampleTable::setTimeToSampleParams( } mTimeToSampleCount = U32_AT(&header[4]); - uint64_t allocSize = mTimeToSampleCount * 2 * (uint64_t)sizeof(uint32_t); + uint64_t allocSize = (uint64_t)mTimeToSampleCount * 2 * sizeof(uint32_t); if (allocSize > SIZE_MAX) { return ERROR_OUT_OF_RANGE; } @@ -379,7 +379,7 @@ status_t SampleTable::setCompositionTimeToSampleParams( } mNumCompositionTimeDeltaEntries = numEntries; - uint64_t allocSize = numEntries * 2 * (uint64_t)sizeof(uint32_t); + uint64_t allocSize = (uint64_t)numEntries * 2 * sizeof(uint32_t); if (allocSize > SIZE_MAX) { return ERROR_OUT_OF_RANGE; } |