Merge "Add overflow checks in Memory objects." am: 856bccbdc3
am: 69b4dfe13e

Change-Id: I8643664cfd8b0738fdcd7ed4c9815307acdd46e8