OSDN Git Service

Prevent integer underflow if size is below 6
authorJoshua J. Drake <android-open-source@qoop.org>
Mon, 4 May 2015 22:57:24 +0000 (17:57 -0500)
committerNick Kralevich <nnk@google.com>
Fri, 8 May 2015 03:27:31 +0000 (20:27 -0700)
commit9458e715d391ee8fe455fc31f07ff35ce12e0531
treef5787de2ee60cc0a4d1bad91792ee4da6c8cf0a3
parent3f4431e97376b8a315ad8862724e1e1fb34c9292
Prevent integer underflow if size is below 6

When processing 3GPP metadata, a subtraction operation may underflow and
lead to a rather large linear byteswap operation in the subsequent
framedata decoding code. Bound the 'size' value to prevent this from
occurring.

Bug: 20923261
Change-Id: I35dfbc8878c6b65cfe8b8adb7351a77ad4d604e5
media/libstagefright/MPEG4Extractor.cpp