mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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:65fe0866ae("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 <vlee@freedesktop.org> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5182> (cherry picked from commit8b353524b0)
This commit is contained in:
parent
60b57b609f
commit
7a595a578e
2 changed files with 2 additions and 2 deletions
|
|
@ -1543,7 +1543,7 @@
|
|||
"description": "vdpau: Fix wrong calloc sizeof argument.",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "65fe0866aec7b5608419f6d184cb1fa4fe1dc45a"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue