Hello Paul,

Am 05.11.2018 um 06:09 schrieb Paul Davey:
Add local size_t variable to crypto_comp_decompress as intermediate
storage for destination length to avoid memory corruption and incorrect
results on 64 bit targets.

This is what linux does for the various lz compression implementations.

Signed-off-by: Paul Davey <[email protected]>
Cc: Heiko Schocher <[email protected]>
---

When attempting to use ubifs on a MIPS64 platform I found that it would fail
decompression for the file I was attempting to load.

Further investigation found that this was due to the pointer cast from unsigned
int * to size_t * in the decompression wrapper.  This will cause any big endian
64 bit platform to fail to load any ubifs file that requires decompression and
at least cause little endian 64 bit platforms to silently write 0 over 4 bytes
of stack memory.

  fs/ubifs/ubifs.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to u-boot-ubi.git master

Thanks!

bye,
Heiko
--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: [email protected]
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to