Camera: Prevent data size overflow

Add a function to check overflow when calculating metadata
data size.

Bug: 30741779
Change-Id: I6405fe608567a4f4113674050f826f305ecae030
(cherry picked from commit 8e7a2b4d13bff03973dbad2bfb88a04296140433)
1 file changed