u-boot/net
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: a156c47e39 ("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
..
arp.c net: Don't overwrite waiting packets with asynchronous replies 2018-10-10 12:29:01 -05:00
arp.h net: Don't overwrite waiting packets with asynchronous replies 2018-10-10 12:29:01 -05:00
bootp.c env: Move env_get_ulong() to env.h 2019-08-11 16:43:41 -04:00
bootp.h net: Use packed structures for networking 2017-08-07 15:18:31 -05:00
cdp.c SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
cdp.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
checksum.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
dns.c env: Move env_set() to env.h 2019-08-11 16:43:41 -04:00
dns.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
eth-uclass.c net: Always build the string_to_enetaddr() helper 2019-12-09 09:47:41 -06:00
eth_common.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
eth_internal.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
eth_legacy.c net: Always build the string_to_enetaddr() helper 2019-12-09 09:47:41 -06:00
fastboot.c net: fastboot: Fix build when FASTBOOT_FLASH is disabled 2018-07-02 14:14:20 -05:00
Kconfig net: Convert CONFIG_TFTP_BLOCKSIZE to Kconfig 2019-06-14 16:10:36 -04:00
link_local.c common: Move random-number functions into their own header 2019-12-02 18:23:07 -05:00
link_local.h net: Add link-local addressing support 2012-05-23 17:53:08 -05:00
Makefile net: introduce packet capture support 2019-09-04 11:37:19 -05:00
mdio-mux-uclass.c net: add MDIO_MUX DM class 2019-07-18 16:37:13 -05:00
mdio-uclass.c net: mdio-uclass: name MDIO according to device-name property if preset 2019-09-04 11:37:19 -05:00
net.c net: avoid address-of-packed-member error 2019-12-09 09:47:42 -06:00
net_rand.h net: Get mac address from driver as seed 2017-08-07 15:18:28 -05:00
nfs.c common: Move get_ticks() function out of common.h 2019-12-02 18:23:13 -05:00
nfs.h net: nfs: remove superfluous packed attribute 2019-09-04 11:37:19 -05:00
pcap.c net: introduce packet capture support 2019-09-04 11:37:19 -05:00
ping.c net: Consolidate UDP header functions 2018-10-10 12:29:02 -05:00
ping.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
rarp.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
rarp.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
sntp.c dm: net: rtc: Support using driver model for rtc in sntp 2015-05-05 20:58:40 -06:00
sntp.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tftp.c net: tftp: Fix tftp store address check in store_block() 2019-12-09 09:47:42 -06:00
wol.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
wol.h net: Add new wol command - Wake on LAN 2018-07-02 14:14:20 -05:00