Check for overflow of crypto size

Bug: 111603051
Test: CTS
Change-Id: Ib5b1802b9b35769a25c16e2b977308cf7a810606
(cherry picked from commit d1fd02761236b35a336434367131f71bef7405c9)

 AMediaCodecPersistentSurface(
 const sp<IGraphicBufferProducer>& igbp,
 const sp<PersistentSurface>& ps)
 : Surface(igbp) {
        mPersistentSurface = ps;
 }

 AMediaCodecPersistentSurface(
 const sp<IGraphicBufferProducer>& igbp,
 const sp<PersistentSurface>& ps)
 : Surface(igbp) {
        mPersistentSurface = ps;
 }
