mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-20 22:08:10 +02:00
Previously the output length of pvr_get_driver_build_sha() is changed to BUILD_ID_EXPECTED_HASH_LENGTH, but the array defined to receive its output, the driver_build_sha array inside struct pvr_instance, is declared with BLAKE3_KEY_LEN, which is longer than BUILD_ID_EXPECTED_HASH_LENGTH. This leads to uninitialized memory being accessed when creating pipelineCacheUUID value, and the pipelineCacheUUID value would become random in each run, defecting the purpose of it. Refactor the code copying the build ID to follow other drivers: changing the parameter from the buffer to the instance pointer, inserting a static assert thanks to being able to retrieve the destination buffer length (as an array inside the instance structure) and using copy_build_id_to_sha1() to do the final copy. Fixes: |
||
|---|---|---|
| .. | ||
| ci | ||
| common | ||
| csbgen | ||
| drm-shim | ||
| include | ||
| pco | ||
| vulkan | ||
| .clang-format | ||
| .dir-locals.el | ||
| .editorconfig | ||
| meson.build | ||