Fix potential overflow

Check width and height are not negative, to avoid overflow after
casting to uint64_t.

Bug: 129405342
Test: manual
Change-Id: Ic540879a59cd69a29a1c4dce88ea38316792586c
1 file changed