From: Vinson Lee Date: Sat, 23 May 2020 00:59:27 +0000 (-0700) Subject: vdpau: Fix wrong calloc sizeof argument. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b353524b04fa9cd77e21e2d036c69f1cff30c35;p=mesa.git vdpau: Fix wrong calloc sizeof argument. Fix warning reported by Coverity Scan. Wrong sizeof argument (SIZEOF_MISMATCH) suspicious_sizeof: Passing argument 3544UL (sizeof (vlVdpPresentationQueue)) to function calloc that returns a pointer of type vlVdpPresentationQueueTarget * is suspicious because a multiple of sizeof (vlVdpPresentationQueueTarget) /*16*/ is expected. Fixes: 65fe0866aec7 ("vl: implemented a few functions and made stubs to get mplayer running") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3026 Signed-off-by: Vinson Lee Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- diff --git a/src/gallium/frontends/vdpau/device.c b/src/gallium/frontends/vdpau/device.c index 5df30ea3c08..f69c54c4536 100644 --- a/src/gallium/frontends/vdpau/device.c +++ b/src/gallium/frontends/vdpau/device.c @@ -170,7 +170,7 @@ vlVdpPresentationQueueTargetCreateX11(VdpDevice device, Drawable drawable, if (!dev) return VDP_STATUS_INVALID_HANDLE; - pqt = CALLOC(1, sizeof(vlVdpPresentationQueue)); + pqt = CALLOC(1, sizeof(vlVdpPresentationQueueTarget)); if (!pqt) return VDP_STATUS_RESOURCES;