[U-Boot-Users] Re: [patch] add support for AMD Alchemy Pb1x00 boards to u-boot-1.1.2
amdyer at gmail.com
Mon Sep 26 00:40:56 CEST 2005
On 9/24/05, Wolfgang Denk <wd at denx.de> wrote:
> > I've also fixed the mii and usb commands which can dereference a null
> > pointer when called without arguments.
> No, this is not possible. The command definition requires always at
> least one argument. This part rejected.
I beg to differ - I've seen this problem also. The code in
main.c:run_command() checks for more than more than a
maximum but never checks a minimum number of arguments,
so entering mii<CR> makes cmd_mii get called with argv = 'mii'
and argc = 1. main.c:parse_line() sets argv to NULL.
The code in cmd_mii.c assumes there will be a valid argv,
but never checks argc before using argv. This leads to an
exception on machines where 0 is not a valid address (like MIPS).
The parts of a computer system that can be kicked.
More information about the U-Boot