Xext: add __size_assert in xvdisp.c

See: https://github.com/X11Libre/xserver/pull/1021
See: https://github.com/X11Libre/xserver/issues/706

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
stefan11111
2025-09-15 13:47:34 +03:00
committed by Enrico Weigelt
parent 765d0de418
commit dbfd395b28

View File

@@ -765,6 +765,7 @@ ProcXvQueryImageAttributes(ClientPtr client)
/* allocating for `offsets` as well as `pitches` in one block */
/* both having CARD32 * num_planes (actually int32_t put into CARD32) */
__size_assert(int, sizeof(INT32));
int *offsets = x_rpcbuf_reserve(&rpcbuf, 2 * num_planes * sizeof(int));
if (!offsets)
return BadAlloc;