The old code had a loop limit overflow bug which caused a semi-
infinite loop for small packets, because in "i<len-8", "i" was signed,
but "len" was unsigned, and "len-8" became a huge number for small
values of "len".
This is a workaround which replaces broken commit 8f1bc284.
Signed-off-by: Wolfgang Denk <wd@denx.de>
The TFTP OACK code trusts that the incoming packet is formated as
ASCII text and can be processed by string functions. It also has a
loop limit overflow bug where if the packet length is less than 8, it
ends up looping over *all* of memory to find the 'blksize' string.
This patch solves the problem by forcing the packet to be null
terminated and using strstr() to search for the sub string.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
TFTP does not work anymore after multicast tftp
patch was applied on little endian systems.
This patch fix it.
Signed-off-by: Stefano Babic <sbabic@denx.de>
Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.
Signed-off-by: Jon Loeliger <jdl@freescale.com>
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.
All transformations are of the form:
Before:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
#if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)
Signed-off-by: Jon Loeliger <jdl@freescale.com>
Use the approved environment variable names. Added "tftpdstp" to
allow ports other than 69 per Tolunay Orkun's recommendation.
Patch by Jerry Van Baren, 12 Jan 2005
- show PCI clock frequency on MPC8260 systems
- add FCC_PSMR_RMII flag for HiP7 processors
- in do_jffs2_fsload(), take load address from load_addr if not set
explicit, update load_addr otherwise
- replaced printf by putc/puts when no formatting is needed
(smaller code size, faster execution)
* Cleanup compiler warnings
* Fix problem with side effects in macros in include/usb.h
* Patch by David Benson, 13 Nov 2003:
bug 841358 - fix TFTP download size limit
* Fixing bug 850768:
improper flush_cache() in load_serial()
* Fixing bug 834943:
MPC8540 - missing volatile declarations
* Patch by Stephen Williams, 09 Feb 2004:
Add support for Xilinx SystemACE chip:
- New files common/cmd_ace.c and include/systemace.h
- Hook systemace support into cmd_fat and the partition manager
* Patch by Travis Sawyer, 09 Feb 2004:
Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux
recent tools
* Add checksum verification to 'imls' command
* Add bd_info fields needed for 4xx Linux I2C driver
* Patch by Martin Krause, 4 Nov. 2003:
Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap)
* Print used network interface when CONFIG_NET_MULTI is set
* Make fatload set filesize environment variable
fix potential buffer overlow problem
* enable basic / medium / high-end configurations for PPChameleonEVB
board; fix NAND code
* enable TFTP client code to specify to the server the desired
timeout value (see RFC-2349)
allow selection of clock frequency as "make" target
* Implement memory autosizing code for IceCube boards
* Configure network port on INCA-IP for autonegotiation
* Fix overflow problem in network timeout code
* Patch by Richard Woodruff, 8 Aug 2003:
Allow crc32 to be used at address 0x000 (crc32_no_comp, too).
* Add support for TQM862L at 100/50 MHz
* Patch by Pantelis Antoniou, 02 Jun 2003:
major reconstruction of networking code;
add "ping" support (outgoing only!)