Merge "Fix for crash due to negative size passed to memcpy" into pi-dev
am: a9f6ff8ccc

Change-Id: I84a1b9baa02444c296f734ed14fd76c3423c2442