diff options
| author | Pali Rohár <[email protected]> | 2021-08-03 16:28:38 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2021-09-03 14:32:40 -0400 |
| commit | 1e7478461bb4e8842f1ca8e5ffb5a441041b0753 (patch) | |
| tree | 2760a8ed96bc8cbd1c9325c51d39eb659680a542 /doc/develop | |
| parent | 00179319714fd2076cf81f49de357ee699672f31 (diff) | |
xyz-modem: Fix crash after cancelling transfer
Variable xyz.len is set to -1 on error. At the end xyzModem_stream_read()
function calls memcpy() with length from variable xyz.len. If this variable
is set to -1 then value passed to memcpy is casted to unsigned value, which
means to copy whole address space. Which then cause U-Boot crash. E.g. on
arm64 it cause CPU crash: "Synchronous Abort" handler, esr 0x96000006
Fix this issue by checking that value stored in xyz.len is valid prior
trying to use it.
Signed-off-by: Pali Rohár <[email protected]>
Acked-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'doc/develop')
0 files changed, 0 insertions, 0 deletions
