Have CommandBuffer::CreateTransferBuffer take a uint32_t instead of size_t

Because client and service may be of different bitness, offsets in command
buffers have to fit in a uint32_t, effectively limiting transfer buffers to 4GB.
Make this clear in CommandBuffer::CreateTransferBuffer by taking a uin32_t
instead of a size_t (fixing callers as appropriate), avoiding potential security
issues with silent clamping.

Bug: 905509
Change-Id: I8392f2e73e95bf65e08fa9896e2acc53afa0d268
Reviewed-on: https://chromium-review.googlesource.com/c/1396132
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#620132}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5cb6cecb3b5a26a6392be6c7a246d6dbdcef3d08
2 files changed