OSDN Git Service

android-x86/frameworks-av.git
8 years agoRevert "Impose a size bound for dynamically allocated tables in stbl."
Wonsik Kim [Wed, 22 Jun 2016 18:19:15 +0000 (18:19 +0000)]
Revert "Impose a size bound for dynamically allocated tables in stbl."

This reverts commit 25e029746796fe88e82417fb01af2e27b8bbadb2.

Change-Id: I91225838a8be72a3cd413f2bcb99e7dca7e62929

8 years agoImpose a size bound for dynamically allocated tables in stbl.
Pawin Vongmasa [Wed, 22 Jun 2016 02:10:21 +0000 (19:10 -0700)]
Impose a size bound for dynamically allocated tables in stbl.

Impose a restriction of 200MiB for tables in stsc, stts, ctts and stss
boxes. Also change Vector to std::vector for efficiency and consistency.

Bug: 29367429
Change-Id: I175da524612b9fe68496c612966af51f01a5cd5e

8 years agoMerge "DO NOT MERGE SoftAAC2: fix crash on all-zero adts buffer" into klp-dev
Marco Nelissen [Fri, 10 Jun 2016 23:02:40 +0000 (23:02 +0000)]
Merge "DO NOT MERGE SoftAAC2: fix crash on all-zero adts buffer" into klp-dev

8 years agoMerge "Don't use sp<>&" into klp-dev
Marco Nelissen [Wed, 8 Jun 2016 22:56:35 +0000 (22:56 +0000)]
Merge "Don't use sp<>&" into klp-dev

8 years agoDO NOT MERGE SoftAAC2: fix crash on all-zero adts buffer
Marco Nelissen [Wed, 8 Jun 2016 22:00:08 +0000 (15:00 -0700)]
DO NOT MERGE SoftAAC2: fix crash on all-zero adts buffer

Bug: 29153599
Change-Id: Ieb70a90cf31927165de7a840bfdd3ee2c76f4cbd

8 years agoFix potential overflow
Marco Nelissen [Tue, 7 Jun 2016 22:48:07 +0000 (15:48 -0700)]
Fix potential overflow

Bug: 28533562
Change-Id: I798ab24caa4c81f3ba564cad7c9ee019284fb702

8 years agoDon't use sp<>&
Marco Nelissen [Tue, 7 Jun 2016 19:26:43 +0000 (12:26 -0700)]
Don't use sp<>&

because they may end up pointing to NULL after a NULL check was performed.

Bug: 28166152
Change-Id: Iab2ea30395b620628cc6f3d067dd4f6fcda824fe

8 years agoDO NOT MERGE MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4Source...
Wei Jia [Fri, 28 Aug 2015 17:35:35 +0000 (10:35 -0700)]
DO NOT MERGE MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4Source as track.

GenericSource: return error when no track exists.

SampleIterator: make sure mSamplesPerChunk is not zero before using it as divisor.

Bug: 21657957
Bug: 23705695
Bug: 22802344
Bug: 28799341
Change-Id: I7664992ade90b935d3f255dcd43ecc2898f30b04
(cherry picked from commit 0386c91b8a910a134e5898ffa924c1b6c7560b13)

8 years agoMerge "DO NOT MERGE limit mediaserver memory" into klp-dev
Marco Nelissen [Mon, 23 May 2016 22:35:11 +0000 (22:35 +0000)]
Merge "DO NOT MERGE limit mediaserver memory" into klp-dev

8 years agoDO NOT MERGE limit mediaserver memory
Marco Nelissen [Fri, 13 May 2016 17:43:19 +0000 (10:43 -0700)]
DO NOT MERGE limit mediaserver memory

Limit mediaserver using rlimit, to prevent it from bringing down the system
via the low memory killer.
Default max is 65% of total RAM, but can be customized via system property.

Bug: 28471206
Bug: 28615448
Change-Id: I14fac1e12b5f3983be08a21bfbfc54feedbf3f16

8 years agoMerge "DO NOT MERGE Check malloc result to avoid NPD" into klp-dev
Marco Nelissen [Mon, 23 May 2016 14:32:45 +0000 (14:32 +0000)]
Merge "DO NOT MERGE Check malloc result to avoid NPD" into klp-dev

8 years agoMerge "Fix security vulnerability in libstagefright" into klp-dev
Jeff Tinker [Fri, 13 May 2016 21:08:15 +0000 (21:08 +0000)]
Merge "Fix security vulnerability in libstagefright" into klp-dev

8 years agoDO NOT MERGE Check malloc result to avoid NPD
Marco Nelissen [Wed, 11 May 2016 18:11:20 +0000 (11:11 -0700)]
DO NOT MERGE Check malloc result to avoid NPD

Bug: 28471206
Change-Id: Id5d055d76893d6f53a2e524ff5f282d1ddca3345

8 years agoFix security vulnerability in libstagefright
Jeff Tinker [Fri, 13 May 2016 18:48:11 +0000 (11:48 -0700)]
Fix security vulnerability in libstagefright

bug: 28175045
Change-Id: Icee6c7eb5b761da4aa3e412fb71825508d74d38f

8 years agoh264bsdActivateParamSets: Prevent multiplication overflow.
Pawin Vongmasa [Wed, 11 May 2016 23:08:21 +0000 (16:08 -0700)]
h264bsdActivateParamSets: Prevent multiplication overflow.

Report MEMORY_ALLOCATION_ERROR if pStorage->picSizeInMbs would
exceed UINT32_MAX bytes.

Bug: 28532266
Change-Id: Ia6f11efb18818afcdb5fa2a38a14f2a2d8c8447a

8 years agoMerge "Clear unused pointer field when sending across binder" into klp-dev
Marco Nelissen [Tue, 3 May 2016 23:15:43 +0000 (23:15 +0000)]
Merge "Clear unused pointer field when sending across binder" into klp-dev

8 years agoClear unused pointer field when sending across binder
Marco Nelissen [Mon, 2 May 2016 21:12:34 +0000 (14:12 -0700)]
Clear unused pointer field when sending across binder

Bug: 28377502
Change-Id: Iad5ebfb0a9ef89f09755bb332579dbd3534f9c98

8 years agoMerge "DO NOT MERGE More OMX struct checking" into klp-dev
Marco Nelissen [Fri, 22 Apr 2016 17:45:56 +0000 (17:45 +0000)]
Merge "DO NOT MERGE More OMX struct checking" into klp-dev

8 years agoDO NOT MERGE More OMX struct checking
Marco Nelissen [Fri, 22 Apr 2016 14:54:04 +0000 (07:54 -0700)]
DO NOT MERGE More OMX struct checking

These were lost due to bad merges.

Bug: 27207275
Change-Id: Ia0f403d7aef79a8e0ac618eb49b34dbf9faa25c2

8 years agoSampleTable.cpp: Fixed a regression caused by a fix for bug
Pawin Vongmasa [Wed, 20 Apr 2016 22:51:48 +0000 (15:51 -0700)]
SampleTable.cpp: Fixed a regression caused by a fix for bug
28076789.

Detail: Before the original fix
(Id207f369ab7b27787d83f5d8fc48dc53ed9fcdc9) for 28076789, the
code allowed a time-to-sample table size to be 0. The change
made in that fix disallowed such situation, which in fact should
be allowed. This current patch allows it again while maintaining
the security of the previous fix.

Bug: 28288202
Bug: 28076789
Change-Id: I1c9a60c7f0cfcbd3d908f24998dde15d5136a295

8 years agoMerge "DO NOT MERGE codecs: check OMX buffer size before use in (gsm|g711)dec" into...
Wonsik Kim [Mon, 18 Apr 2016 04:39:54 +0000 (04:39 +0000)]
Merge "DO NOT MERGE codecs: check OMX buffer size before use in (gsm|g711)dec" into klp-dev

8 years agoMerge "SampleTable.cpp: Prevent corrupted stts block from causing excessive memory...
Pawin Vongmasa [Sat, 16 Apr 2016 00:01:22 +0000 (00:01 +0000)]
Merge "SampleTable.cpp: Prevent corrupted stts block from causing excessive memory allocation." into klp-dev

8 years agoSampleTable.cpp: Prevent corrupted stts block from causing
Pawin Vongmasa [Wed, 13 Apr 2016 23:25:12 +0000 (16:25 -0700)]
SampleTable.cpp: Prevent corrupted stts block from causing
excessive memory allocation.

Details:

DataSource.h
- Added function getVector() for reading from a data source into
  a Vector object, whose capacity grows only as much as needed
  (in case of EOS or reading error).
SampleTable.h
- Changed the type of mTimeToSample from uint32_t* to
  Vector<uint32_t>.
SampleTable.cpp
- In setTimeToSample, modified the code to use getVector()
  instead of readAt(). If the input source has a corrupt
  time-to-sample table size that is too big, EOS will be reached
  before the whole table is read, and the return value from
  getVector() will be false.
- Also, tightened the bound for the provided time-to-sample table
  size to guarantee that the table does not take more than
  UINT_MAX32 bytes in memory.

Bug: 28076789
Change-Id: Id207f369ab7b27787d83f5d8fc48dc53ed9fcdc9

8 years agoh264dec: check for overflows when calculating allocation size.
Marco Nelissen [Fri, 8 Apr 2016 17:04:48 +0000 (10:04 -0700)]
h264dec: check for overflows when calculating allocation size.

Bug: 27855419
Change-Id: Idabedca52913ec31ea5cb6a6109ab94e3fb2badd

8 years agoMerge "DO NOT MERGE codecs: check OMX buffer size before use in vorbisdec" into klp-dev
Wonsik Kim [Fri, 8 Apr 2016 01:05:03 +0000 (01:05 +0000)]
Merge "DO NOT MERGE codecs: check OMX buffer size before use in vorbisdec" into klp-dev

8 years agoMerge "DO NOT MERGE codecs: check OMX buffer size before use in (h263|h264)dec" into...
Wonsik Kim [Fri, 8 Apr 2016 01:03:55 +0000 (01:03 +0000)]
Merge "DO NOT MERGE codecs: check OMX buffer size before use in (h263|h264)dec" into klp-dev

8 years agoDO NOT MERGE codecs: check OMX buffer size before use in (gsm|g711)dec
Wonsik Kim [Thu, 7 Apr 2016 08:45:02 +0000 (17:45 +0900)]
DO NOT MERGE codecs: check OMX buffer size before use in (gsm|g711)dec

Bug: 27793163
Bug: 27793367
Change-Id: Iec3de8a237ee2379d87a8371c13e543878c6652c

8 years agoMerge "Check mp3 output buffer size" into klp-dev
Marco Nelissen [Thu, 7 Apr 2016 21:24:52 +0000 (21:24 +0000)]
Merge "Check mp3 output buffer size" into klp-dev

8 years agoAudioSource: initialize variables
Marco Nelissen [Tue, 5 Apr 2016 21:20:11 +0000 (14:20 -0700)]
AudioSource: initialize variables

to prevent info leak

Bug: 27855172
Change-Id: I3d33e0a9cc5cf8a758d7b0794590b09c43a24561

8 years agoCheck mp3 output buffer size
Marco Nelissen [Wed, 23 Mar 2016 22:36:36 +0000 (15:36 -0700)]
Check mp3 output buffer size

Bug: 27793371
Change-Id: I0fe40a4cfd0a5b488f93d3f3ba6f9495235926ac

8 years agoDO NOT MERGE codecs: check OMX buffer size before use in (h263|h264)dec
Wonsik Kim [Sun, 20 Mar 2016 01:44:44 +0000 (10:44 +0900)]
DO NOT MERGE codecs: check OMX buffer size before use in (h263|h264)dec

Bug: 27833616
Change-Id: I0fd599b3da431425d89236ffdd9df423c11947c0

8 years agoDO NOT MERGE codecs: check OMX buffer size before use in vorbisdec
Wonsik Kim [Wed, 30 Mar 2016 08:13:00 +0000 (17:13 +0900)]
DO NOT MERGE codecs: check OMX buffer size before use in vorbisdec

Bug: 27833616
Change-Id: I1ccdd16a00741da072527a6d13e87fd7c7fe8c54

8 years agoMerge "SampleTable: reduce unnecessary logging message." into klp-dev
Wei Jia [Fri, 25 Mar 2016 21:22:40 +0000 (21:22 +0000)]
Merge "SampleTable: reduce unnecessary logging message." into klp-dev

8 years agoFix AMR decoder
Marco Nelissen [Fri, 25 Mar 2016 15:26:18 +0000 (08:26 -0700)]
Fix AMR decoder

Previous change caused EOS to be ignored.

Bug: 27843673
Related-to-bug: 27662364
Change-Id: Ia148a88abc861a9b393f42bc7cd63d8d3ae349bc

8 years agoSampleTable: reduce unnecessary logging message.
Wei Jia [Thu, 24 Mar 2016 17:58:04 +0000 (10:58 -0700)]
SampleTable: reduce unnecessary logging message.

Bug: 23247055
Change-Id: Ida0021160532623c6e72bd5bb0bb2a24332d1c34

8 years agoSampleTable: add logging.
Wei Jia [Thu, 24 Mar 2016 16:41:24 +0000 (09:41 -0700)]
SampleTable: add logging.

Bug: 23247055
Change-Id: Id45f9815c1b3cdfaae664508204a6ce1c1da4532

8 years agoMerge "DO NOT MERGE codecs: check OMX buffer size before use in VP8 encoder." into...
Wonsik Kim [Tue, 22 Mar 2016 22:31:01 +0000 (22:31 +0000)]
Merge "DO NOT MERGE codecs: check OMX buffer size before use in VP8 encoder." into klp-dev

8 years agoMerge "NuPlayerStreamListener: NULL and bounds check before memcpy" into klp-dev
Marco Nelissen [Tue, 22 Mar 2016 20:43:54 +0000 (20:43 +0000)]
Merge "NuPlayerStreamListener: NULL and bounds check before memcpy" into klp-dev

8 years agoSoftAMR: check input buffer size to avoid overflow.
Wei Jia [Sat, 19 Mar 2016 01:17:14 +0000 (18:17 -0700)]
SoftAMR: check input buffer size to avoid overflow.

Bug: 27662364
Change-Id: I47380545ea7d85845e141e722b0d84f498d27145

8 years agoSoftAMR: check output buffer size to avoid overflow.
Wei Jia [Thu, 17 Mar 2016 18:15:02 +0000 (11:15 -0700)]
SoftAMR: check output buffer size to avoid overflow.

Bug: 27662364
Change-Id: I7b26892c41d6f2e690e77478ab855c2fed1ff6b0

8 years agoDO NOT MERGE codecs: check OMX buffer size before use in VP8 encoder.
Wonsik Kim [Sun, 20 Mar 2016 01:44:44 +0000 (10:44 +0900)]
DO NOT MERGE codecs: check OMX buffer size before use in VP8 encoder.

Bug: 27569635
Change-Id: I469573f40e21dc9f4c200749d4f220e3a2d31761

8 years agoMerge "Camera3Device: Validate template ID" into klp-dev
Chien-Yu Chen [Mon, 21 Mar 2016 18:15:07 +0000 (18:15 +0000)]
Merge "Camera3Device: Validate template ID" into klp-dev

8 years agoNuPlayerStreamListener: NULL and bounds check before memcpy
Robert Shih [Fri, 18 Mar 2016 21:34:57 +0000 (14:34 -0700)]
NuPlayerStreamListener: NULL and bounds check before memcpy

Bug: 27533704
Change-Id: I992a7709b92b1cbc3114c97bec48a3fc5b22ba6e

8 years agoCamera3Device: Validate template ID
Chien-Yu Chen [Wed, 9 Mar 2016 20:21:01 +0000 (12:21 -0800)]
Camera3Device: Validate template ID

Validate template ID before creating a default request.

Bug: 26866110
Bug: 27568958
Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d

8 years agoDO NOT MERGE Add VPX output buffer size check
Marco Nelissen [Wed, 16 Mar 2016 17:32:05 +0000 (10:32 -0700)]
DO NOT MERGE Add VPX output buffer size check

and handle dead observers more gracefully

Bug: 27597103
Change-Id: Id7acb25d5ef69b197da15ec200a9e4f9e7b03518

8 years agoDO NOT MERGE Don't reject "thumbnail mode" setConfig
Marco Nelissen [Fri, 11 Mar 2016 22:40:17 +0000 (14:40 -0800)]
DO NOT MERGE Don't reject "thumbnail mode" setConfig

Bug: 27207275
Change-Id: I35f6bf5b407869a9479feaf1b5beef7b68d04509

8 years agoMerge "DO NOT MERGE Verify OMX buffer sizes prior to access" into klp-dev
Marco Nelissen [Fri, 4 Mar 2016 23:22:59 +0000 (23:22 +0000)]
Merge "DO NOT MERGE Verify OMX buffer sizes prior to access" into klp-dev

8 years agoDO NOT MERGE Verify OMX buffer sizes prior to access
Marco Nelissen [Mon, 29 Feb 2016 20:47:20 +0000 (12:47 -0800)]
DO NOT MERGE Verify OMX buffer sizes prior to access

Bug: 27207275
Change-Id: I4412825d1ee233d993af0a67708bea54304ff62d

8 years agoMerge "Also fix out of bounds access for normal read" into klp-dev
Marco Nelissen [Wed, 24 Feb 2016 21:05:22 +0000 (21:05 +0000)]
Merge "Also fix out of bounds access for normal read" into klp-dev

8 years agoGet service by value instead of reference
Marco Nelissen [Thu, 18 Feb 2016 16:25:47 +0000 (08:25 -0800)]
Get service by value instead of reference

to prevent a cleared service binder from being used.

Bug: 26040840
Change-Id: Ifb5483c55b172d3553deb80dbe27f2204b86ecdb

8 years agoAlso fix out of bounds access for normal read
Marco Nelissen [Tue, 23 Feb 2016 22:48:46 +0000 (14:48 -0800)]
Also fix out of bounds access for normal read

Previous fix accidentally only fixed the fragmented read case.

Bug: 27208621
Change-Id: Ie16f1920b84c8aba613842659238fcd5925694ad

8 years agoClear allocation to avoid info leak
Marco Nelissen [Mon, 22 Feb 2016 21:05:15 +0000 (13:05 -0800)]
Clear allocation to avoid info leak

Bug: 26914474
Change-Id: Ie1a86e86d78058d041149fe599a4996e7f8185cf

8 years agoDO NOT MERGE - Remove deprecated image defines
Vignesh Venkatasubramanian [Wed, 13 Jan 2016 20:18:05 +0000 (12:18 -0800)]
DO NOT MERGE - Remove deprecated image defines

libvpx has always supported the VPX_ prefixed versions of these defines.
The unprefixed versions have been removed in the most recent release.

https://chromium.googlesource.com/webm/libvpx/+/9cdaa3d72eade9ad162ef8f78a93bd8f85c6de10

BUG=23452792

Change-Id: Ib02073f42d545e6c08f9bd4a4fc868e3be886c1b

8 years agoCamera: Disallow dumping clients directly
Eino-Ville Talvala [Wed, 13 Jan 2016 18:07:04 +0000 (10:07 -0800)]
Camera: Disallow dumping clients directly

Camera service dumps should only be initiated through
ICameraService::dump.

Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803

8 years agoFix out-of-bounds write
Marco Nelissen [Tue, 12 Jan 2016 20:37:36 +0000 (12:37 -0800)]
Fix out-of-bounds write

Bug: 26365349
Change-Id: Ia363d9f8c231cf255dea852e0bbf5ca466c7990b

8 years agofix possible overflow in effect wrappers.
Eric Laurent [Fri, 8 Jan 2016 18:52:38 +0000 (10:52 -0800)]
fix possible overflow in effect wrappers.

Add checks on parameter size field in effect command handlers
to avoid overflow leading to invalid comparison with min allowed
size for command and reply buffers.

Bug: 26347509.
Change-Id: I20e6a9b6de8e5172b957caa1ac9410b9752efa4d
(cherry picked from commit ad1bd92a49d78df6bc6e75bee68c517c1326f3cf)

8 years agoDO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread
Andy Hung [Wed, 2 Dec 2015 23:55:23 +0000 (15:55 -0800)]
DO NOT MERGE SoundPool: add lock for findSample access from SoundPoolThread

Sample decoding still occurs in SoundPoolThread
without holding the SoundPool lock.

Bug: 25781119
Change-Id: I11fde005aa9cf5438e0390a0d2dfe0ec1dd282e8

8 years agoDO NOT MERGE - libstagefright: check requested memory size before allocation for...
Wei Jia [Fri, 20 Nov 2015 18:34:35 +0000 (10:34 -0800)]
DO NOT MERGE - libstagefright: check requested memory size before allocation for SoftMPEG4Encoder and SoftVPXEncoder.

Bug: 25812794
Change-Id: I96dc74734380d462583f6efa33d09946f9532809
(cherry picked from commit 87f8cbb223ee516803dbb99699320c2484cbf3ba)

8 years agoMerge "stagefright: MPEG4Extractor: allow 'hdlr' box before first track" into klp-dev
Jon Larimer [Tue, 20 Oct 2015 20:55:20 +0000 (20:55 +0000)]
Merge "stagefright: MPEG4Extractor: allow 'hdlr' box before first track" into klp-dev

8 years agoMerge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread...
Glenn Kasten [Wed, 14 Oct 2015 20:30:55 +0000 (20:30 +0000)]
Merge "DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread" into klp-dev

8 years agoMerge "DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer...
Wei Jia [Thu, 8 Oct 2015 16:37:26 +0000 (16:37 +0000)]
Merge "DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer." into klp-dev

8 years agoDO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.
Wei Jia [Mon, 28 Sep 2015 18:32:23 +0000 (11:32 -0700)]
DO NOT MERGE - OMX: allow only secure codec to remotely call allocateBuffer.

Bug: 24310423
Change-Id: Iebcfc58b447f925ec2134898060af2ef227266a3
(cherry picked from commit 8dde7269a5356503d2b283234b6cb46d0c3f214e)

8 years agoID3: check possible integer overflow for extendedHeaderSize and paddingSize.
Wei Jia [Mon, 5 Oct 2015 17:44:23 +0000 (10:44 -0700)]
ID3: check possible integer overflow for extendedHeaderSize and paddingSize.

Bug: 24623447
Change-Id: Ifbc74454d6e28ad7136efe35ab638a07e46398b1
(cherry picked from commit b3694ff5a5bcecd4b6cedca156f6effb55bbf4ca)

8 years agoMerge "Check NAL size before use" into klp-dev
Marco Nelissen [Tue, 6 Oct 2015 16:34:45 +0000 (16:34 +0000)]
Merge "Check NAL size before use" into klp-dev

8 years agoMerge "MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData...
Wei Jia [Tue, 6 Oct 2015 16:21:35 +0000 (16:21 +0000)]
Merge "MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData." into klp-dev

8 years agoCheck NAL size before use
Marco Nelissen [Fri, 2 Oct 2015 22:12:00 +0000 (15:12 -0700)]
Check NAL size before use

Bug: 24441553
Bug: 24445122
Change-Id: Ib7f025769adbafd5a2cb64fae5562a0a565945c2

8 years agoMPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.
Wei Jia [Mon, 28 Sep 2015 21:50:47 +0000 (14:50 -0700)]
MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.

Bug: 24346430
Change-Id: I897a724e968841d9160f819d06c0ce22f6d743c4
(cherry picked from commit 5cae16bdce77b0a3ba590b55637f7d55a2f35402)

8 years agoDon't crash when there's no conceal frame
Marco Nelissen [Mon, 5 Oct 2015 17:46:11 +0000 (10:46 -0700)]
Don't crash when there's no conceal frame

Bug: 24630158
Change-Id: If042aebebb58c218eb7bbf01dcddbcbd05dca1d6

8 years agostagefright: MPEG4Extractor: allow 'hdlr' box before first track
Lajos Molnar [Tue, 1 Sep 2015 00:19:52 +0000 (17:19 -0700)]
stagefright: MPEG4Extractor: allow 'hdlr' box before first track

Bug: 21725583
Change-Id: I799c1967759c7e49fb50281a1708188450caac77
(cherry picked from commit cf75af8f76265fb2909028f5dc68c7029dbe5f49)

8 years agoDO NOT MERGE stagefright: fix AMessage::FromParcel
Flanker [Fri, 11 Sep 2015 11:05:47 +0000 (19:05 +0800)]
DO NOT MERGE stagefright: fix AMessage::FromParcel

Add check for incoming mNumItems. Also add check readCString return
value.

Fix style & add log.

Bug: 24123723

Change-Id: If41a5312c27d868f481893eef56019b6807c39b7

8 years agoDO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread
Andy Hung [Thu, 24 Sep 2015 22:08:13 +0000 (15:08 -0700)]
DO NOT MERGE - AudioFlinger: Clear record buffers when starting RecordThread

Bug: 24211743
Bug: 24267152
Change-Id: I58c55e56b85067b71e4e300f947b4dfc159637ba

8 years agoMerge "DO NOT MERGE Fix vulnerability in mediaserver" into klp-dev
Jeff Tinker [Thu, 17 Sep 2015 17:04:25 +0000 (17:04 +0000)]
Merge "DO NOT MERGE Fix vulnerability in mediaserver" into klp-dev

8 years agoMerge "Fix for security vulnerability in media server DO NOT MERGE" into klp-dev
Jeff Tinker [Thu, 17 Sep 2015 17:04:05 +0000 (17:04 +0000)]
Merge "Fix for security vulnerability in media server DO NOT MERGE" into klp-dev

8 years agoMerge "DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info...
Wei Jia [Thu, 17 Sep 2015 13:19:08 +0000 (13:19 +0000)]
Merge "DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel." into klp-dev

8 years agoMerge "Fix heap data leak vulnerability" into klp-dev
Jeff Tinker [Wed, 16 Sep 2015 18:17:46 +0000 (18:17 +0000)]
Merge "Fix heap data leak vulnerability" into klp-dev

8 years agoDO NOT MERGE Fix vulnerability in mediaserver
Jeff Tinker [Wed, 16 Sep 2015 17:23:12 +0000 (10:23 -0700)]
DO NOT MERGE Fix vulnerability in mediaserver

ICrypto.cpp: ASLR bypass using DECRYPT IPC

bug: 24074485
Change-Id: I40dd0e92083c7093030393b16dbab59323306a4e

8 years agoDO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak...
Wei Jia [Thu, 10 Sep 2015 16:47:29 +0000 (09:47 -0700)]
DO NOT MERGE - IAudioFlinger: always initialize variables to ensure no info leak when writing them to Parcel.

Bug: 23953967
Change-Id: Ibbe841da149038675e9e8daea76c77558bc8564b
(cherry picked from commit 983dca391a76fb45df999fc40e8766b9ddb63511)

8 years agoMerge "DO NOT MERGE NuCachedSource2: fix possible erroneous early free" into klp-dev
Wonsik Kim [Wed, 16 Sep 2015 07:11:04 +0000 (07:11 +0000)]
Merge "DO NOT MERGE NuCachedSource2: fix possible erroneous early free" into klp-dev

8 years agoFix heap data leak vulnerability
Jeff Tinker [Mon, 14 Sep 2015 20:55:23 +0000 (13:55 -0700)]
Fix heap data leak vulnerability

bug: 23600291
Change-Id: I7979e9e25ada01c13775be8580d433a8b4ce4ffe

8 years agoFix for security vulnerability in media server DO NOT MERGE
Jeff Tinker [Mon, 14 Sep 2015 17:18:56 +0000 (10:18 -0700)]
Fix for security vulnerability in media server DO NOT MERGE

bug: 23540426
Change-Id: I5d602f99fd82e50d0136d47ce20cfa1ac9fd7ae2

8 years agoDO NOT MERGE NuCachedSource2: fix possible erroneous early free
Wonsik Kim [Tue, 8 Sep 2015 08:32:28 +0000 (17:32 +0900)]
DO NOT MERGE NuCachedSource2: fix possible erroneous early free

Because the constructor of NuCachedSource2 sent a message to
AHandlerReflector object, AHandlerReflector::onMessageReceived could
have executed just before the object gets wrapped in a strong
pointer, resulting in erroneous early free. Fix the issue by using
static Create function to ensure the message is sent after the
object is wrapped in a sp.

Bug: 23882800
Change-Id: I38a9d7a3083f184b4c81d0b00ba1661721278855

8 years agoMerge "DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel....
Wei Jia [Fri, 11 Sep 2015 13:54:59 +0000 (13:54 +0000)]
Merge "DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel." into klp-dev

8 years agoMerge "DO NOT MERGE fix build" into klp-dev
Wonsik Kim [Fri, 11 Sep 2015 07:34:53 +0000 (07:34 +0000)]
Merge "DO NOT MERGE fix build" into klp-dev

8 years agoDO NOT MERGE fix build
Wonsik Kim [Fri, 11 Sep 2015 07:14:18 +0000 (16:14 +0900)]
DO NOT MERGE fix build

Bug: 23707088

Change-Id: Ib0d6cbc52710f33310d21b2eae1f243f0f8e8bca

8 years agoMerge "DO NOT MERGE Avoid size_t overflow in base64 decoding once again" into klp-dev
Wonsik Kim [Fri, 11 Sep 2015 06:49:22 +0000 (06:49 +0000)]
Merge "DO NOT MERGE Avoid size_t overflow in base64 decoding once again" into klp-dev

8 years agoDO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.
Wei Jia [Wed, 9 Sep 2015 16:48:34 +0000 (09:48 -0700)]
DO NOT MERGE - IAudioFlinger: clear config before reading it from parcel.

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

8 years agoDO NOT MERGE Avoid size_t overflow in base64 decoding once again
Wonsik Kim [Mon, 7 Sep 2015 06:52:27 +0000 (15:52 +0900)]
DO NOT MERGE Avoid size_t overflow in base64 decoding once again

Switch to foundation base64 function in OggExtractor and fix the
issue there.

Bug: 23707088
Change-Id: I999ae911177c88dc13f9ee9796ca93c5928b20b0

8 years agolibstagefright: fix A_Refl to return immediately when there is an error.
Wei Jia [Fri, 4 Sep 2015 16:13:37 +0000 (09:13 -0700)]
libstagefright: fix A_Refl to return immediately when there is an error.

Bug: 23609206
Change-Id: I2ad25fb208df17f5a5b6d6b356eff2f400627f22
(cherry picked from commit 715dcb9c90d86c1a02a0da056f3cee8875ad1230)

8 years agoMerge "Zero out return values in media binder calls" into klp-dev
Robert Shih [Thu, 3 Sep 2015 17:21:20 +0000 (17:21 +0000)]
Merge "Zero out return values in media binder calls" into klp-dev

8 years agoMerge "Make IEffect command more robust (second try)" into klp-dev
Andy Hung [Thu, 3 Sep 2015 17:16:12 +0000 (17:16 +0000)]
Merge "Make IEffect command more robust (second try)" into klp-dev

8 years agoMerge "Fix timedtext parsing" into klp-dev
Marco Nelissen [Thu, 3 Sep 2015 17:05:55 +0000 (17:05 +0000)]
Merge "Fix timedtext parsing" into klp-dev

8 years agoDO NOT MERGE - libstagefright: sanity check size before dereferencing pointer in...
Wei Jia [Tue, 1 Sep 2015 18:14:18 +0000 (11:14 -0700)]
DO NOT MERGE - libstagefright: sanity check size before dereferencing pointer in Utils.cpp

Also remove some CHECK's.

Bug: 23680780
Change-Id: I62d0941e203e40209fa6fbe3f923f3efdc5a6c23
(cherry picked from commit 7bb772e0c643ff3292599cf485b9dbf232bf39a4)

8 years agoOgg: avoid size_t overflow in base64 decoding
Wonsik Kim [Wed, 2 Sep 2015 07:02:19 +0000 (16:02 +0900)]
Ogg: avoid size_t overflow in base64 decoding

Bug: 23707088
Change-Id: I8d32841fee3213c721cdcc57788807ea64d19d74

8 years agoZero out return values in media binder calls
Robert Shih [Wed, 2 Sep 2015 23:46:59 +0000 (16:46 -0700)]
Zero out return values in media binder calls

More specifically when handling:
* GET_STREAM_VOLUME in IAudioPolicyService, and
* GET_CURRENT_POSITION and GET_DURATION in IMediaPlayer

This prevents leaking uninitialized values across binder in error cases.

Bug: 23756261
Change-Id: I0ffd900ab12b685b0611259ade4a3efb1ec5defe

8 years agoMake IEffect command more robust (second try)
Andy Hung [Tue, 1 Sep 2015 20:07:56 +0000 (20:07 +0000)]
Make IEffect command more robust (second try)

Bug: 23540907
Change-Id: If30cfa535ad51521053706fc40fc98d893db5bc7
(cherry picked from commit 10e6660cc5da65b027c90489ba7ac55d1504e012)

8 years agoFix timedtext parsing
Marco Nelissen [Thu, 27 Aug 2015 20:49:32 +0000 (13:49 -0700)]
Fix timedtext parsing

Add bounds checking and fix other bugs.

Bug: 23284974
Bug: 23541506
Bug: 23542351
Bug: 23542352
Change-Id: I53551efdf109ce1833e0c361efaf4cee7a851023

8 years agoMerge "libmedia: clear reply data for IEffect command" into klp-dev
Andy Hung [Fri, 28 Aug 2015 20:49:57 +0000 (20:49 +0000)]
Merge "libmedia: clear reply data for IEffect command" into klp-dev

8 years agoIMediaPlayer.cpp: make sure structures are initialized to 0
Nick Kralevich [Thu, 20 Aug 2015 16:56:39 +0000 (09:56 -0700)]
IMediaPlayer.cpp: make sure structures are initialized to 0

Credit https://code.google.com/p/android/issues/detail?id=183310

Bug: 23515142
Change-Id: Idbd66fb148bd0ac1dd78f8651d0164f2a41e2427
(cherry picked from commit b73b826cc16291b33649402497efbe0f946413bd)

8 years agolibmedia: clear reply data for IEffect command
Andy Hung [Wed, 26 Aug 2015 23:34:33 +0000 (16:34 -0700)]
libmedia: clear reply data for IEffect command

Bug: 23540907
Change-Id: Ib89afc6b273b0eb310bbc5a1bd92b1e3d407c249

8 years agoMerge "DO NOT MERGE - Fix software video decoder buffer size calculation" into klp-dev
Abhishek Arya [Tue, 25 Aug 2015 04:00:04 +0000 (04:00 +0000)]
Merge "DO NOT MERGE - Fix software video decoder buffer size calculation" into klp-dev