minigbm: zero init cros_gralloc0_buffer_info

This change ensures no garbage data in the untouched stride and offset.
We need this because cros_gralloc0_buffer_info doesn't have num_planes,
and num_fds can sometimes be (num_planes + 1). So the client needs to
rely on stride being non-zero to retrieve the num_planes.

TEST=check the stride and offset data

Change-Id: Iccc9bb3d3dd6a9eea80c1e859116cbb96cd44d32
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2940203
Commit-Queue: Yiwei Zhang <zzyiwei@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
diff --git a/cros_gralloc/gralloc0/gralloc0.cc b/cros_gralloc/gralloc0/gralloc0.cc
index 4f72fbf..8bab6b2 100644
--- a/cros_gralloc/gralloc0/gralloc0.cc
+++ b/cros_gralloc/gralloc0/gralloc0.cc
@@ -378,6 +378,7 @@
 		break;
 	case GRALLOC_DRM_GET_BUFFER_INFO:
 		info = va_arg(args, struct cros_gralloc0_buffer_info *);
+		memset(info, 0, sizeof(*info));
 		info->drm_fourcc = drv_get_standard_fourcc(hnd->format);
 		info->num_fds = hnd->num_planes;
 		ret = mod->driver->resource_info(handle, strides, offsets, &format_modifier);