Module: Mesa Branch: staging/20.3 Commit: 66587ecf54270e9e222171c61419400db1f4179a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=66587ecf54270e9e222171c61419400db1f4179a
Author: Pierre-Eric Pelloux-Prayer <[email protected]> Date: Fri Mar 12 09:19:57 2021 +0100 frontends/va: fix protected slice data buffer read size Read vlVaBuffer->size bytes instead of an hardcoded value. Fixes: deb7dc82f62 ("frontends/va: handle protected slice data buffer") Reviewed-by: Zoltán Böszörményi <[email protected]> Reviewed-by: James Zhu <[email protected]> Reviewed-by: Boyuan Zhang <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9553> (cherry picked from commit 9e5623ccc39fe4b4d04421baa87fa01798a10353) --- .pick_status.json | 2 +- src/gallium/frontends/va/picture.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4826de7d365..349fecce725 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -211,7 +211,7 @@ "description": "frontends/va: fix protected slice data buffer read size", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "deb7dc82f626e92525d01829d88f0ac348de03b8" }, diff --git a/src/gallium/frontends/va/picture.c b/src/gallium/frontends/va/picture.c index bcfb79e75f2..0b65e2687a2 100644 --- a/src/gallium/frontends/va/picture.c +++ b/src/gallium/frontends/va/picture.c @@ -263,7 +263,7 @@ handleVAProtectedSliceDataBufferType(vlVaContext *context, vlVaBuffer *buf) { uint8_t* encrypted_data = (uint8_t*) buf->data; - unsigned int drm_key_size = 56 * 4; + unsigned int drm_key_size = buf->size; context->desc.base.decrypt_key = CALLOC(1, drm_key_size); memcpy(context->desc.base.decrypt_key, encrypted_data, drm_key_size); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
