Avoid integer overflow
Avoid integer overflow

Summary: `begin_offset` is unsigned, let's avoid integer overflow.

Reviewed By: vitaut

Differential Revision: D30378326

fbshipit-source-id: 98f9a82fa42d42d21aa178683ca0ac1bedf8bff6

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift