mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
pvr: Use BUILD_ID_EXPECTED_HASH_LENGTH
SHA1_DIGEST_LENGTH was changed to refect BLAKE3 exposed with SHA1 functions - switch
to BUILD_ID_EXPECTED_HASH_LENGTH.
Fixes: 492a176cbb ("util: increase SHA1_DIGEST_LENGTH to 32 (BLAKE3_KEY_LEN)")
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39192>
This commit is contained in:
parent
be190a5d3d
commit
6a42493c94
1 changed files with 3 additions and 3 deletions
|
|
@ -306,7 +306,7 @@ out:
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
pvr_get_driver_build_sha(uint8_t sha_out[const static SHA1_DIGEST_LENGTH])
|
pvr_get_driver_build_sha(uint8_t sha_out[const static BUILD_ID_EXPECTED_HASH_LENGTH])
|
||||||
{
|
{
|
||||||
const struct build_id_note *note;
|
const struct build_id_note *note;
|
||||||
unsigned build_id_len;
|
unsigned build_id_len;
|
||||||
|
|
@ -318,12 +318,12 @@ pvr_get_driver_build_sha(uint8_t sha_out[const static SHA1_DIGEST_LENGTH])
|
||||||
}
|
}
|
||||||
|
|
||||||
build_id_len = build_id_length(note);
|
build_id_len = build_id_length(note);
|
||||||
if (build_id_len < SHA1_DIGEST_LENGTH) {
|
if (build_id_len < BUILD_ID_EXPECTED_HASH_LENGTH) {
|
||||||
mesa_loge("Build-id too short. It needs to be a SHA.");
|
mesa_loge("Build-id too short. It needs to be a SHA.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(sha_out, build_id_data(note), SHA1_DIGEST_LENGTH);
|
memcpy(sha_out, build_id_data(note), BUILD_ID_EXPECTED_HASH_LENGTH);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue