1. 20 9月, 2012 1 次提交
  2. 29 11月, 2010 1 次提交
  3. 05 7月, 2010 1 次提交
    • W
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk 提交于
      The hush shell dynamically allocates (and re-allocates) memory for the
      argument strings in the "char *argv[]" argument vector passed to
      commands.  Any code that modifies these pointers will cause serious
      corruption of the malloc data structures and crash U-Boot, so make
      sure the compiler can check that no such modifications are being done
      by changing the code into "char * const argv[]".
      
      This modification is the result of debugging a strange crash caused
      after adding a new command, which used the following argument
      processing code which has been working perfectly fine in all Unix
      systems since version 6 - but not so in U-Boot:
      
      int main (int argc, char **argv)
      {
      	while (--argc > 0 && **++argv == '-') {
      /* ====> */	while (*++*argv) {
      			switch (**argv) {
      			case 'd':
      				debug++;
      				break;
      			...
      			default:
      				usage ();
      			}
      		}
      	}
      	...
      }
      
      The line marked "====>" will corrupt the malloc data structures and
      usually cause U-Boot to crash when the next command gets executed by
      the shell.  With the modification, the compiler will prevent this with
      an
      	error: increment of read-only location '*argv'
      
      N.B.: The code above can be trivially rewritten like this:
      
      	while (--argc > 0 && **++argv == '-') {
      		char *arg = *argv;
      		while (*++arg) {
      			switch (*arg) {
      			...
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      54841ab5
  4. 13 4月, 2010 1 次提交
  5. 21 10月, 2008 1 次提交
  6. 19 10月, 2008 1 次提交
  7. 03 9月, 2008 1 次提交
  8. 27 8月, 2008 2 次提交
  9. 18 1月, 2008 2 次提交
  10. 08 11月, 2007 1 次提交
  11. 16 9月, 2007 1 次提交
  12. 11 7月, 2007 1 次提交
  13. 19 6月, 2007 1 次提交
    • T
      Added M5329AFEE and M5329BFEE Platforms · 8e585f02
      TsiChung Liew 提交于
      Added board/freescale/m5329evb, cpu/mcf532x, drivers/net,
      drivers/serial,  immap_5329.h, m5329.h, mcfrtc.h,
      include/configs/M5329EVB.h, lib_m68k/interrupts.c, and
      rtc/mcfrtc.c
      
      Modified CREDITS, MAKEFILE, Makefile, README, common/cmd_bdinfo.c,
      common/cmd_mii.c, include/asm-m68k/byteorder.h, include/asm-m68k/fec.h,
      include/asm-m68k/io.h, include/asm-m68k/mcftimer.h,
      include/asm-m68k/mcfuart.h, include/asm-m68k/ptrace.h,
      include/asm-m68k/u-boot.h, lib_m68k/Makefile, lib_m68k/board.c,
      lib_m68k/time.c, net/eth.c and rtc/Makefile
      Signed-off-by: NTsiChung Liew <Tsi-Chung.Liew@freescale.com>
      8e585f02