util/blob: use memcpy in read functions
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Mon, 23 May 2022 08:33:25 +0000 (10:33 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 7 Jul 2022 12:25:05 +0000 (12:25 +0000)
commit3c61f2cc15dddc212fbc17f561fe496029ed5661
tree720eff2c0f6c18302508a06b93ba9a49f9d5dc36
parent8856379a030be313227ba4d92083a4b05749b58e
util/blob: use memcpy in read functions

Type casting may require specific alignment on some platforms;
since the input data can be provided by the application we can't
require any alignment.

Switch to using memcpy like the write functions do, and drop the
asserts.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6493
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16662>
src/util/blob.c