Fix calculation of num_ints.

We were previously mismatching bytes and ints in this calculation. With
the current version of the code this seems to be harmless resulting
in allocating a larger native_handle than necessary, but prior to
commit 166fe14ab52e this miscalculation led to a buffer overflow when
cloning the handle, resulting in a failed uaccess when MTE was enabled.

Bug: b:178231152
Change-Id: I70cf86c0eb2dfe1bf343eb143db973a94d7e8b13
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2703833
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Auto-Submit: Peter Collingbourne <pcc@chromium.org>
1 file changed