From: Andrew Dyer <amdyer@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Re: [patch] add support for AMD Alchemy Pb1x00 boards to u-boot-1.1.2
Date: Sun, 25 Sep 2005 17:40:56 -0500 [thread overview]
Message-ID: <c166aa9f0509251540218b986e@mail.gmail.com> (raw)
In-Reply-To: <20050924225258.83F763529BB@atlas.denx.de>
On 9/24/05, Wolfgang Denk <wd@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[0] = 'mii'
and argc = 1. main.c:parse_line() sets argv[1] to NULL.
The code in cmd_mii.c assumes there will be a valid argv[1],
but never checks argc before using argv[1]. This leads to an
exception on machines where 0 is not a valid address (like MIPS).
--
Hardware, n.:
The parts of a computer system that can be kicked.
prev parent reply other threads:[~2005-09-25 22:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1106244186.8838.23.camel@kronenbourg.scs.ch>
2005-09-24 22:52 ` [U-Boot-Users] Re: [patch] add support for AMD Alchemy Pb1x00 boards to u-boot-1.1.2 Wolfgang Denk
2005-09-25 22:40 ` Andrew Dyer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c166aa9f0509251540218b986e@mail.gmail.com \
--to=amdyer@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox