OSDN Git Service

libstagefright: Fix crash in convertMetaDataToMessage
authorWei Jia <wjia@google.com>
Thu, 25 Jun 2015 18:46:54 +0000 (11:46 -0700)
committerNick Kralevich <nnk@google.com>
Wed, 19 Aug 2015 22:08:40 +0000 (15:08 -0700)
commit4bce636865bdf0e2a79fc9a5d9a69107649c850d
tree0a5b0a831c5a0872690fd99558964a13b81ebbf3
parentfd5942b332c5f6e4dc50f50181344957334854e1
libstagefright: Fix crash in convertMetaDataToMessage

- The ABuffer used for the Message has a preset value of 1024, if
  flattening the meta data exceeds this value, a check fails hence
  the crash.
- This change creates a new ABuffer if the buffer size would exceed
  the buffer capacity.

Bug: 22771132

CRs-Fixed: 857850

(cherry picked from commit 9c170c076382096b9e767da0e3f9f37dafa76546)

Change-Id: I056ade2f95bc8d82dfe092de7ecddba588cc5b72
media/libstagefright/Utils.cpp