Bin Meng ca48cb4028 net: tftp: Fix tftp store address check in store_block()
During testing of qemu-riscv32 with a 2GiB memory configuration,
tftp always fails with a error message:

  Load address: 0x84000000
  Loading: #
  TFTP error: trying to overwrite reserved memory...

It turns out the result of 'tftp_load_addr + tftp_load_size' just
overflows (0x100000000) and the test logic in store_block() fails.
Fix this by adjusting the end address to ULONG_MAX when overflow
is detected.

Fixes: a156c47e39ad ("tftp: prevent overwriting reserved memory")
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2019-12-09 09:47:42 -06:00
..
2019-08-11 16:43:41 -04:00
2019-08-11 16:43:41 -04:00
2019-09-04 11:37:19 -05:00
2019-07-18 16:37:13 -05:00
2019-09-04 11:37:19 -05:00
2018-10-10 12:29:02 -05:00
2018-07-02 14:14:20 -05:00