[PORT FROM MAIN]framwork: MediaScan can't work again after adb push some speical file to phone

BZ: 72174

from my test it happens in the AsfExtractor.cpp.
It will in initialize() => for() forever.
Because the objectSize =0
then offset will be  == fix value,
then readAt() == 24,
so forever.
In common, offset + objectSize will reach another header.
But this bad file(may be made by somebody) is different, it reachs a bad another header.
So it can happen this issue.
If you want to know the bad file name,you can refer patch:(80715) and (79686 Patch Set 9).

Change-Id: Idcc458e23c7f31275559883e2fff42fd54e95fd1
Signed-off-by: Kun Jiang <kunx.jiang@intel.com>
Reviewed-on: http://android.intel.com:8080/82326
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
1 file changed